Salman
Salman

Reputation: 1907

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

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

Upvotes: 15

Views: 21057

Answers (3)

Just click the Beautify button in postman or format the JSON in VSCode or use any JSON formatter in online.

enter image description here

Upvotes: 1

Alejandro Garcia
Alejandro Garcia

Reputation: 195

In my case the white spaces (tab spaces before properties) had a special encoding, to solve the problem, just delete them and replace them with spaces:

Upvotes: 1

Danny Dainton
Danny Dainton

Reputation: 25921

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]"
}

Upvotes: 29

Related Questions