Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get rid of Content-type in postman request

Tags:

rest

postman

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

like image 207
Andrey Yaskulsky Avatar asked Jan 11 '18 20:01

Andrey Yaskulsky


People also ask

How do I change the Content-Type on my Postman?

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.

Do I need Content-Type for GET request?

Since (by validity of the input spec) there are no content types for GET requests, you will always default to application/json .

Where is Content-Type Postman?

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.

Is Content-Type header optional?

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.


1 Answers

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. enter image description here

like image 86
Yuli Bonner Avatar answered Oct 11 '22 06:10

Yuli Bonner