How to set the Content-Type header in Postman

In order to add content in the Body tab, you have to first select a content type option (none, form-data, etc…). When you select the type and add content, Postman automatically generates the Content-Type header. You can see the auto-generated Content-Type header in the Headers tab.

The following table shows what Content-Type header value is generated for each of the main content type options:

Content type optionContent-Type
NoneDoesn’t add the header
raw > Texttext/plain
raw > JSONapplication/json
raw > XMLapplication/xml

If it added the right Content-Type value for you, then you’re good to go. Otherwise, you can override it as I’ll show below.

Override the Content-Type header

If you need a different Content-Type value, you can manually specify it in the Headers tab. You can’t edit the auto-generated Content-Type value (it’s read-only). Instead, you have to add a new key called “Content-Type” and then put the value you want.

For example, let’s say you want to use the “text/csv” Content-Type. Here’s what this would look like in the Headers tab:

Postman Headers tab showing the manually typed in key=Content-Type value=text/csv

Notice that the auto-generated Content-Type value has a strikethrough (text/plain). This indicates it’s being overridden by the Content-Type header you added manually.

Now when you send the request, it’ll use the Content-Type header you entered.

Leave a Comment