# Access Response Headers with Postman Tests

**URL:** <https://community.postman.com/t/access-response-headers-with-postman-tests/4654>\
**Category:** Help Hub\
**Created:** [March 21, 2019, 7:11pm UTC](https://community.postman.com/t/access-response-headers-with-postman-tests/4654 "2019-03-21T19:11:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfrancis-vendini](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@pfrancis-vendini](https://community.postman.com/u/pfrancis-vendini)\
**Post date:** [March 21, 2019, 7:11pm UTC](https://community.postman.com/t/access-response-headers-with-postman-tests/4654/1 "2019-03-21T19:11:15Z")

</div>

Hi,

Is there a way to access the Response Headers with a Postman test? I am making a call to check the Status of a website, but would also like to console log the Server and Content-Type values that are returned. thanks for any insights

---

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [March 21, 2019, 7:35pm UTC](https://community.postman.com/t/access-response-headers-with-postman-tests/4654/2 "2019-03-21T19:35:42Z")

</div>

@pfrancis-vendini Welcome to the Postman Community and yes, there’s definitely a way to access the response headers within the test script.

You can use the following in your test script:

```auto
let responseHeaders = pm.response.headers.all();

```

You can [read the docs around how to use the `pm.response` api](https://learning.getpostman.com/docs/postman/scripts/postman_sandbox_api_reference/#pmresponse) and all the different functions that it offers.

Also, _HeaderList_ docs - [http://www.postmanlabs.com/postman-collection/HeaderList.html](http://www.postmanlabs.com/postman-collection/HeaderList.html)

---

<div class="post-metadata">

**Author:** ![pfrancis-vendini](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@pfrancis-vendini](https://community.postman.com/u/pfrancis-vendini)\
**Post date:** [March 21, 2019, 8:52pm UTC](https://community.postman.com/t/access-response-headers-with-postman-tests/4654/3 "2019-03-21T20:52:46Z")

</div>

slvcan, Thanks very much! Cheers! 😀

---

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [May 9, 2020, 5:59am UTC](https://community.postman.com/t/access-response-headers-with-postman-tests/4654/4 "2020-05-09T05:59:15Z")

</div>

Closed on May 9, 2020, 5:59am UTC


