I have changed my app so that it sets Content-type
to application/json
in case if the header is absent and now trying to test it.
For this purpose I use Postman. However, when I uncheck "Content-type" header in "Headers" tab Postman still sends Content-type=text/plain;charset=UTF-8
.
Is there a way to avoid this and just not send anything in Content-type
header?
Would appreciate any help, thanks
You can set a content type header manually if you need to override the one Postman sends automatically. You can use variables in your body data and Postman will populate their current values when sending your request. To beautify your XML or JSON, select the text in the editor and then select ⌘+Option+B or Ctrl+Alt+B.
Since (by validity of the input spec) there are no content types for GET requests, you will always default to application/json .
To do this, open Postman and create a new request by selecting New->Request from the top left: Under Headers, select Key = Content-Type: For Value, select application/json: THANKS FOR READING.
Multipart Bodies discusses -multipart message bodies and content types. A Content-Type header is optional. The MIME specification defines a part without a Content-Type header as text/plain; charset=us-ascii.
Go to the body tab, select 'raw' from the sub menu. To the right of 'binary' in the sub menu, a picklist will be available. Select 'Text' (not 'Text[text/plain]') from this list. This will remove the Content-Type header.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With