Search code examples
angularpostman

Post method issue using Postman


When I make this API post Request /posts/{id}/comments/add :

https://api.stackexchange.com/2.2/posts/45754385/comments/add?body=%20A%20comment%20Post%20test&key=**********&access_token=********&preview=true&filter=default&site=stackoverflow

I get this error:

{
  "error_id": 400,
  "error_message": "POST methods expects all parameters to be submitted as a form, not on the query string",
  "error_name": "bad_parameter"
}

Any solution for this?


Solution

  • So select "POST" instead of "GET" in postman and put your body to the POST body instead of address line

    enter image description here