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

3

15

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

Pediment answered 26/11, 2018 at 14:31 Comment(0)
G
29

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]"
}
Gerhardt answered 26/11, 2018 at 14:43 Comment(0)
D
1

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:

Decury answered 14/12, 2022 at 18:59 Comment(0)
E
1

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

enter image description here

Edmondson answered 27/2, 2023 at 4:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.