I am having a problem with HTTP requests. I keep getting a 400 error.
The service I'm trying to access is expecting a JSON body with the following format:
{
"items":[{
"id":0,
"modifiers":[],
"note":"",
"quantity":0
}],
"type":0
}
Where 0
can be any number really. However, the request that my application is sending is formatted like this.
{
"items":[{
"id":0,
"note":"",
"modifiers":[],
"quantity":0
}],
"type":0
}
Could this be the cause of the 400 HTTP Request error code that I keep getting?
This is not the error reason. Order of the json key:value doesn't matter. You could check this link to find out error reason:
http://www.checkupdown.com/status/E400.html
hope this will help you.