Search code examples
javarestpostman

Postman throws bad request while sending JSON as request parameter in Rest Api


Sending json as request parameter in Rest api from Postman throws Bad Request Exception.

I encountered this while testing a legacy system. Sending json in a request param is not a good idea unless you cannot avoid it like in my case.

So, what is the correct way of sending json as request param from Postman?


Solution

  • You need to select the json param and select Encode URI Component before sending the request.

    enter image description here