Reputation: 101
I tried to POST a request to a web API. The website help says if I POST a JSON like this, it will response with a token:
{
"client_id": "0xDMgCIF9bW3bRBKlUicpivvOoLGExCJqbOHqPYI",
"client_secret": "BQKCoBO3iNXo52cMmiKPmuyYW0mE1PpPJOHXxQFgcJuWzg92PC",
"grant_type": "client_credentials"
}
But after I use Postman to POST the request, I put the above string in the body section, it always return 400 BAD REQUEST response. I have never used POSTMAN before. Can someone help to check if the string content is correct or not?
Upvotes: 0
Views: 422
Reputation: 19979
you have to choose body type as json not formdata:
choose body>raw>json and replace the content with your json
Upvotes: 0