Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP POST Request, 400 bad request error

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?

like image 325
user2324679 Avatar asked Jul 11 '26 20:07

user2324679


1 Answers

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.

like image 152
Saurav Avatar answered Jul 13 '26 22:07

Saurav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!