TestProject Forum
Powered by leading experts in the test automation community

HTTP GET Request action returns 406 instead of 200

I am trying to perform a get http request for an endpoint without any header details and it returns 406 instead of 200

Server responded with status code 406 instead of expected 200 status code.
Server returned response body:
{“code”:406,“message”:“unsupported media type requested, only [application/json] are available”}

It works fine from postman. Below is the step that I added in the script. Am I missing anything

Hello @nirupamav
Postman usually adds headers automatically, please add this in your headers field
And try again.

Thank you @ran.tzur
I did try that but still facing same issue

Can you please contact me in our chat so I can better troubleshoot this?

Best Regards , Ran.

I just added accept=*/*​ to headers and it worked finally

Oh that is great, I guess more headers are required as well :slight_smile:

1 Like