I have a problem accessing the body of JSON response provided by the server.
This is what I am aiming for
I managed to get the id "92b458bd5ab5bf6736055d1d91c48ed9c792b300ec9da53e8b91824f2b925d10". I understand to get the rest of result I have to request with query like this
https://www.pathofexile.com/api/trade/fetch/92b458bd5ab5bf6736055d1d91c48ed9c792b300ec9da53e8b91824f2b925d10?=querryGnY9g3hb
This is somehow stored on the server now.
Here is the code:
https://www.toptal.com/developers/hastebin/qifowesehu.csharp
Related
First off, let me apologise for any mistakes, as this is my first post.
Now, for the actual issue:
I've coded a PHP script that handles MySQL Queries, including one that fetches all data from a certain table.
I made it so the final result is a JSON object, containing all rows from said table.
I also coded a Flutter class (Dart) that handles the request for the JSON object via the URL, and I got it to successfully log said JSON to the console.
However, when I use that data to show on an actual List of Widgets, this is what appears on screen:
Error Shown
Any ideas on how to fix this?
(For NDA reasons, I am not allowed to show the console logs.).
Any help is appreciated!
I've been trying to figure this out for the past couple of hours and I thought it might be best to ask for some help at this point.
I am creating a new record (e.g., a new ProducerObjectiveOutcome record). The following error is being thrown after my Ember app posts data from a form to my Rails API:
Assertion Failed: Your outcome record was saved to the server, but the response does not have an id and no id has been set client side. Records must have ids. Please update the server response to provide an id in the response or generate the id on the client side either before saving the record or while normalizing the response.
What's strange is that my API is returning a JSON response with an ID (see below).
{
"producer_objective_outcome": {
"id":27,
"type":"ProducerObjectiveOutcome",
"title":"New outcome",
"owner": {
"id":6
}
}
}
As you might already have picked up, ProducerObjectiveOutcome is a subclass of Outcome.
In both my Ember App and Rails API, I have setup ProducerObjectiveOutcome to inherit from Outcome. In my Ember App particular, this is what the model looks like:
// app/models/producer-objective-outcome.js
import Outcome from "./outcome";
export default Outcome.extend({
});
Nothing fancy going on here – I thought it was all pretty straight forward – but for some reason, that error is coming up. I'm hoping one of you marvelous people can help me out with this!
Thanks in advance!
For anyone who is interested, I solved this by changing the name of the root node of the JSON response to outcome instead of it being producer_objective_outcome.
What may have helped in my earlier explanation is that the ProducerObjectiveOutcome record was being created at the following route: producer/objective/:id/outcome/new.
The key part of this URI, as I have figured just out, is the .../outcome/... section. I haven't tested otherwise, but given the conventions in Ember, I suspect that if that URI was .../producer-objective-outcome/... then everything would have been hunky dory.
TL;DR: the names in your JSON payload should match the route.
I am using jsonplaceholder (http://jsonplaceholder.typicode.com/) locally. I am testing my GET and POST calls via extjs rest proxy.
I am able to read data. But when I create a model object and save it, the HTTp code for option is 204 and for POST is 200
BUT data is not stored in database of jsonplaceholder local server.
Any Idea where actual problem exists?
I have worked with json-server and this is the expected results and for your knowledge, here is a detailed explanation of HTTP Status codes Status Code Definitions.
I was wondering if someone could tell me why I can't see the json response from a request that is also of type json in the JMeter View Results Tree. I know that the response is there because I use a regular expression to extract data (I wrote the reg ex based on result returned in Firebug). So the data can be extracted from the json response it just doesn't display in View Result Tree. I can see the json response for another request for a different app I performance test with JMeter, but that particular request is an ajax request. not sure
Add a sample writer and display content here.
http://jmeter.apache.org/usermanual/component_reference.html#Simple_Data_Writer
You will see the issue
HI there any one who looks in this post for jmeter, you may be bit worried when you cant find answers in internet regarding how to log your response when you sent a request , here is the solution and simple as it is...
just add a line like below.
result.setResponseData("put any content here to be displayed as String.", "UTF-8");
and check your response will be cool as you done.
I am trying this tutorial ,it is working fine if server specify the call back object, like if server prints like this,
callback125([{"symbol":"DDD","price":10.610339195026,"change":0.053085447454327}]);
But my requirements are like, server can only print in pure JSON form like this
[{"symbol": "ABC","price": 87.86,"change": -0.41}]
I tried to do so, json is retrieving but the callback method is not invoking, Is there any solution that we dont need to specify callback method ?
If your server only outputs json cross site request will not work using this approach.
You will have to use your own server to get the data and proxy it to your webapp or the server has to output javascript (calling your callback function).