thisIsTrue
3 years agoVisitor
Is it possible to remove Content-Type in a POST request.
Hello Community. I'm trying to test a REST endpoint where we have a rule that the header "Content-Type" is not mandatory. So I'm setting up some tests for this case, but I can't remove the "Conte...
- 3 years ago
Hey thisIsTrue
Yep you can do this - the easy way is to blank out the MediaType dropdown on your request.
The MediaType combo box (combo box = editable dropdown) on your request config is what defines the Content-Type header on your request. If you have a POST with a json payload, then your MediaType combo box is likely set as 'application/json' (although it could be other values).
If you just delete the value from the MediaType combo box and resubmit your POST, you'll see the Content-Type header is no longer present in the request
Cheers,
Rich