# Setting headers for entire collection/folder

**URL:** <https://community.postman.com/t/setting-headers-for-entire-collection-folder/708>\
**Category:** Help Hub\
**Tags:** scripts, headers\
**Created:** [January 18, 2018, 10:02am UTC](https://community.postman.com/t/setting-headers-for-entire-collection-folder/708 "2018-01-18T10:02:47Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [May 1, 2019, 2:28pm UTC](https://community.postman.com/t/setting-headers-for-entire-collection-folder/708/14 "2019-05-01T14:28:02Z")

</div>

As of 7.0.9 - You should be able to now do this in your `Pre-request Scripts`.

You can use the following syntax:

```auto
pm.request.headers.add({key: 'header_name', value: 'header_value' })

pm.request.headers.upsert({key: 'header_name', value: 'header_value' })

pm.request.headers.remove('header_name')

```

EDIT: Fork this collection to see how it works directly in Postman:  
[https://www.postman.com/postman/workspace/postman-answers/collection/9215231-ef055751-7385-45b4-a6f9-91bbd1c47fa5?ctx=documentation](https://www.postman.com/postman/workspace/postman-answers/collection/9215231-ef055751-7385-45b4-a6f9-91bbd1c47fa5?ctx=documentation)

---

_[View the full topic](https://community.postman.com/t/setting-headers-for-entire-collection-folder/708)._
