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:
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();
and as you can see, the x-timestamp header is there.
My question is, what am I missing, how is this possible?