Postman Community
Access Request Headers after hitting the request
Ask the Experts and Postman Tips
cookie
,
header
,
cookies
,
pre-request-script
,
request-params
w4dd325
(w4dd325)
June 19, 2022, 10:43pm
2
Hi
@maintenance-enginee2
Try;
console.log(pm.request.headers.get("Cookie"));
Example req;
Output;
Unable to read header value for a request that is sent in Pre-req
show post in topic
Related topics
Topic
Replies
Views
Activity
Access Request-Headers AFTER hitting the request
Ask the Experts and Postman Tips
cookie
,
header
,
cookies
,
pre-request-script
,
request-params
0
446
June 18, 2022
Unable to read header value for a request that is sent in Pre-req
Ask the Experts and Postman Tips
tests
,
authentication
16
17075
June 20, 2022
Accessing Request Values from the Console
Ask the Experts and Postman Tips
request
,
pre-request-script
6
1130
October 25, 2023
How to capture cookies value from Cookies and pass it under Headers?
Ask the Experts and Postman Tips
1
1739
April 10, 2019
How to get auto-generated headers with pm.request.headers?
Ask the Experts and Postman Tips
header
1
1942
October 13, 2022