Skip to content

Cookie control with collection runs #1228

Closed
@nlwillia

Description

@nlwillia

I'm testing with a service that sets an unwanted session cookie in the response. If I visit that service in Postman, the cookie is being saved and replayed for later requests.

I've identified several ways to submit a new request without the cookie...

  1. Implement a reset feature in the service that clears the cookie and request it from Postman before making a new service request from the domain/path. (This is not an option if dealing with a 3rd party service.)
  2. Route requests through a proxy that strips the Set-Cookie response header.
  3. Exit Postman and all instances of Chrome including the background process that Chrome runs in the Windows notification area if the "Continue running background apps when Google Chrome is closed" browser setting is checked. Then restart. (Don't think this would work for a non-session cookie.)
  4. Install and enable the Interceptor plugin so that the browser's cookie store is used. Open Chrome to chrome://settings/cookies and manually remove the unwanted cookies before each request. Setting the Cookie header manually from within Postman in Interceptor mode can override the cookie that is sent (Cookie: unwanted-cookie=), but not remove it from the request completely.

None of these are very convenient. Is there a better way to forcibly disable any sort of cookie header being sent?

edit: 2018-04-20 This was originally logged against the Chrome app which has since been deprecated in favor of the native apps. The native apps don't appear to have the same browser-level constraint that made cookie management in Chrome a non-starter. There's now a Cookies link that pops a MANAGE COOKIES modal where cookies can be added or removed. This is an improvement as it's now possible to directly remove an unwanted cookie. Unfortunately there still doesn't seem to be a way to disable cookies entirely. However, the Pre-request Script option is promising as a way to run script to configure things that aren't supported in the UI. This does not appear to support cookie manipulation, but there's a recent issue suggesting it. If that's possible and gets done, then that will become a way to (finally) address this use case.

An aside to all the +1-ers out there, Github has had reactions for over 2 years now; please use them!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions