# Want to compare request header value with response value

**URL:** <https://community.postman.com/t/want-to-compare-request-header-value-with-response-value/15075>\
**Category:** Help Hub\
**Created:** [August 17, 2020, 12:12pm UTC](https://community.postman.com/t/want-to-compare-request-header-value-with-response-value/15075 "2020-08-17T12:12:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit2330](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@rohit2330](https://community.postman.com/u/rohit2330)\
**Post date:** [August 17, 2020, 12:12pm UTC](https://community.postman.com/t/want-to-compare-request-header-value-with-response-value/15075/1 "2020-08-17T12:12:45Z")

</div>

I have POST request which have request header in key, value pair as “userid”:“ABC”. This field is mandatory to have for successful POST. After successful POST response will again have “userid” as a response body element. I am looking for script which will check/compare header value and response value are same for user id field. Please help.

---

<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:** [April 28, 2025, 2:42pm UTC](https://community.postman.com/t/want-to-compare-request-header-value-with-response-value/15075/2 "2025-04-28T14:42:38Z")

</div>

Closed on April 28, 2025, 2:42pm UTC


