Ask a Question

PUT request works in POSTMAN but in ReadyAPI it thows "500 server error"

ravienu
Occasional Contributor

PUT request works in POSTMAN but in ReadyAPI it thows "500 server error"

Hi mates,

I am struggling with some weird issue.

When try to hit PUT request it works well in postman but it throws 500 server error in Ready API(3.41.1).

End point: https://abc.com

Resource: /api/validate/update/00676123

Content-Type: application/json

Header passed: client_id and client_secret.

 

When I send the same thing in ReadyAPI it is throwing me "500 server error". I have automated many GET and POST REST APIs, never faced any such kind of issue. I am trying PUT for the fist time in ReadyAPI.

 

Appreciate any help.

 

3 REPLIES 3
KarelHusa
Super Contributor

@ravienu,

check your JSON request if there are special (invisible) characters.

 

Once my colleague sent me test data via Teams, it took some time to realize the issue.

 

Some API clients remove such special characters; that's why it works with them.

 

Karel@apimate.eu
https://apimate.eu

Hey @ravienu,

Just a follow up to @KarelHusa's good advice.
If you do in fact have special chars (html encodes) in your payload, the Content-Type header needs to be x-www-form-urlencoded (or the multipart-form header) to support processing html encodes in your payload. Html encoding only works on the URI if the Content-Type header is application/json.

Oh yeah, whenever i get problems where stuff works in Postman but not ReadyAPI!, the first thing i do is compare the full RAW content of both requests. Not always, but quite often, the problem is a difference between the headers being submitted between the Postman request and the ReadyAPI! request. You can use a traffic sniffer (like Fiddler) or just manually compare from each app instead.

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
RalfScherer
New Contributor

Hi,

Also check if Postman is sending any Cookies with the request. Best way i can think to detect this kind of problem is using charles web debugging proxy (https://www.charlesproxy.com/) with postman and readyAPI and then compare the requests sent through the proxy.

ciao

    Ralf

cancel
Showing results for 
Search instead for 
Did you mean: