# Unselected header gets still shown

**URL:** <https://community.postman.com/t/unselected-header-gets-still-shown/32410>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [February 9, 2022, 2:56pm UTC](https://community.postman.com/t/unselected-header-gets-still-shown/32410 "2022-02-09T14:56:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xakrurychle](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xakrurychle](https://community.postman.com/u/xakrurychle)\
**Post date:** [February 9, 2022, 2:56pm UTC](https://community.postman.com/t/unselected-header-gets-still-shown/32410/1 "2022-02-09T14:56:39Z")

</div>

I have a request with certain headers required and I’m testing for a scenario where I omit those required headers.  
While I can see and prove that the header is not sent (via pm console), I can still get the header as part of a variable that i set and recall in tests tab which to me is a very strange and unintuitive behaviour…  
If I delete the header, the behaviour is fine but unselecting the header should have the same results, right? Tbh, it is not the first time I noticed that it’s better to just delete rather than unselect or comment it out…it’s “the safer way” to get adequate results…

_Details (like screenshots)_:

_How I found the problem_:

 ![Screenshot 2022-02-09 at 14.35.55](https://us1.discourse-cdn.com/getpostman/original/2X/7/7c421eb5f06224cbb21e3ac428a68a07b95f0b4f.png)  
 ![Screenshot 2022-02-09 at 15.39.54](https://us1.discourse-cdn.com/getpostman/original/2X/1/1e44293351393e19f77dc9325907a04b63431790.png)  
 ![Screenshot 2022-02-09 at 15.40.15](https://us1.discourse-cdn.com/getpostman/original/2X/f/f2d74e684eddea4df5e9ba66b33ec2c12e5609d4.png)

First screen shows the initial setup  
Second screen shows the request headers in console (x-timestamp header is not there)  
Third screen shows the request headers through a script used in tests tab:

var requestHeaders = pm.request.getHeaders();

console.log(“request headers”);

console.log(requestHeaders);

and as you can see, the x-timestamp header is there.

My question is, what am I missing, how is this possible?
