Disable Temporary Headers

I have noticed that new version on Postman is having a section called “temporary Headers”.
Is there a way to disable that.

1 Like

You want to disable sending the headers or stop showing it. We have just released a patch that hides it by default.

If you want to disable sending the temp headers, I’m afraid that is not possible since Postman is adding headers that it thinks is required for the request to go through, which otherwise you’d have had to provide manually. This is same as browsers / other clients do.

1 Like

But when I just want to test the request without cookie.How can I do?
The temporary headers will always add the cookie to the request.

1 Like

The whole point of Postman is to mock HTTP requests, not browsers. I’ve used Postman for years but if unwanted headers are being forced upon me then I’ll have to find an alternative tool like Insomnia.

It’s an absolutely bonkers design decision to add headers no-one wants and make it impossible to remove them. It will make testing APIs impossible because we can’t control what’s actually being sent. Not to mention cookie issues. What were you thinking?!

@liguoqinjim @richjenks There has been no change in the behaviour of the app. Headers like Host/Content-Length/Cookie have always been added to the request - they were just not visible to the user.

These are now shown (under the Temporary Headers section) in the interest of lettings users see exactly what is being sent.

The Host header is not something “no-one wants”. According to https://tools.ietf.org/html/rfc2616, the client must add the header.

Are you seeing any change in behaviour as far the actual API response is concerned?

@abhijit User-Agent, Accept, cookie, accept-encoding and Connection are headers I do not want to be added to requests unless specified.

Are you arguing that it’s desirable to have cookies added against your will?

@richjenks These headers were always added to the request (even in previous versions of the app), but not shown. I’ve added a screenshot showing an older version of Postman making a request. There’s nothing visible in the headers section of the app, but you can see the Accept/Cookie headers being sent in the actual request (on the right).

Not including specific headers is a different problem, and one that will need to be solved differently for each header. The Accept/User-Agent/Host headers can be overriden manually, for example. Not sending cookies will require a separate setting / user flow.

1 Like