Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Postman show "Bad String" in this body of POST request

Tags:

json

post

postman

As i was testing POST request on Postman with details shown in image. I am getting error when i Send this request.

{ "FaultId": "Invalid post data, please correct the request", "fault": "FAULT_INVALID_POST_REQUEST" }

Am i missing something. Details:

Error

like image 391
Salman Avatar asked Nov 26 '18 14:11

Salman


People also ask

How does Postman pass JSON in post request?

In Postman, change the method next to the URL to 'POST', and under the 'Body' tab choose the 'raw' radio button and then 'JSON (application/json)' from the drop down. You can now type in the JSON you want to send along with the POST request. If this is successful, you should see the new data in your 'db. json' file.


1 Answers

Looks like the quote marks are not correct, maybe from copy and pasting from a specifically formatted document or syntax may be wrong.

Try removing/replacing manually or using this:

{
    "FirstName": "blah",
    "LastName": "blah",
    "UserName": "blah",
    "Password": "blah",
    "Email": "[email protected]"
}
like image 178
Danny Dainton Avatar answered Oct 02 '22 15:10

Danny Dainton