Reputation: 229
everyone. I'm trying to use postman for hitting our prod api, but I get some error:
I did not have that problem two days ago, and I have no idea what is happening. Anyone can advise ?
Upvotes: 18
Views: 49385
Reputation: 11
When you give HttpStatusCode as NoContent, this issue comes up. If you change the HttpStatusCode, it will work.
Upvotes: 0
Reputation: 897
I had this problem when I was setting headers in golang using http like this:
w.Header().Set("X-Frame-Options", "Deny")
It worked fine in curl but not in postman and I didn't understand what was wrong. I also checked my headers using -v option in curl. Everything was correct. So I substitute Postman with Insomnia and it's working with no problem.
Upvotes: 1
Reputation: 18445
It looks like a new Postman build is using a stricter header parsing, which is causing some issues for response headers that are not well formatted.
https://github.com/postmanlabs/postman-app-support/issues/8747
Upvotes: 9
Reputation: 21
It's probably related to response header. Try this request in your browser and if it works, look at the response headers in devtools/network to find an invalid character.
In my case request wasn't working in Postman for one specific id. When I looked into response in devtools, I found that there was a double quote inside a double-quoted string header value and I think it caused this error, but I may well be wrong here.
Anyway, try this exact GET request in browser and see if it works there.
Upvotes: 2