Is it possible to have multiple requests with different headers?

Roger Chin
Wed, 04 Sep 2024 06:13:55 +0000
Help Hub

The API I am making requests to sets a cookie header with a key that the API uses to authenticate me as a logged in user. I want to have multiple tabs that sets this header isolated from each other, basically have multiple logged in accounts at the same time, similar to if I use multiple different browsers (eg. Chrome, Firefox, Opera, etc.) to log in different accounts and make requests.

Example.

1. In tab 1, I log in as customer@example.com.

2. In tab 2, I log in as admin@example.com.

3. In tab 3, I log in as merchant@example.com.

4. If I make a request in tab 1, I am making it under customer@example.com.

5. If I make a request in tab 1 to an endpoint that only admins are allowed, it should return 401 as it’s not made under admin@example.com.

6. If I log out of customer@example.com, the cookie header for tab 2 and 3 shouldn’t be affected.

Is this possible? I’ve tried with workspace, collections, environments, and multiple windows but whenever I log out, all tabs and windows loses the cookie header.

7 posts - 3 participants