Some APIs require you to send particular headers with requests to provide metadata about the operation you're performing. You can configure request headers in Postman, and save groups of headers as presets for quick access. Postman also automatically adds headers to your requests as needed depending on your request selections.
You can configure headers in the Headers tab of your request. Enter any key-value pairs you need and Postman will send them along with your request. As you enter text, Postman prompts you with common options you can use to autocomplete your setup, such as Content-Type
.
When you're done configuring headers, select Send to send the request. Learn more about creating and sending requests in Postman.
You can save commonly used headers together in a header preset. In the Headers tab of your request, select the Presets dropdown list and choose Manage Presets. Select Add Header Preset to add a new preset, and enter a name for the preset. Enter key-value pairs, then select Add.
You can select your preset in the Presets dropdown list. Selecting the preset will autopopulate the fields in your request headers.
Postman will automatically add certain headers to your requests based on your request selections and settings. Select hidden at the top of your request's Headers tab for information about what Postman will send with your request.
Hover over a header to view details about it. Postman will indicate why the header has been added. The details will also indicate how to deactivate or override a header value if you need to.
You can make changes to a header in the Authorization tab, the request Body, Cookies for the request domain, the Settings, and in some cases in the Headers tab itself. If you need to go to a different part of the app, Postman will show a link on the right-hand side.
If a header has been added based on your auth setup, select the Authorization tab to change it. To alter cookie headers, change the cookie setup for the domain you're sending the request to.
To deactivate an autogenerated header in the Headers tab, clear its checkbox. To override an autogenerated header value, clear the checkbox next to the autogenerated entry. Then add a separate entry for the header, listing its name in the Key field and specifying your value in the Value field.
If you have more than one entry for the same header, Postman indicates which one will be overridden. Postman prioritizes headers you have either explicitly added in Headers or indirectly with selections you made in the other parts of your request such as Authorization.
For Content-Length
and Content-Type
headers, Postman will automatically calculate values when you send your request, based on the data in the Body tab. However, you can override both values.
Last modified: 2024/02/05
Additional resources
Videos