3

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?

user2324679
  • 31
  • 1
  • 1
  • 3

1 Answers1

1

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.

Saurav
  • 248
  • 3
  • 13
  • Thanks for clearing up the JSON issue(well what I thought was an issue) and pointing me in the right direction. Much appreciated. – user2324679 Aug 26 '13 at 18:00