How to work with cookies #410
-
Hi, we are using cookies for authorization. So the normal flow is that a login request gets a cookie as response and all API requests should then automatically use the cookie by sending them in the header on each request. That is a key feature of Insomnia. I tried the same flow with Bruno but it seems that cookies are not stored between requests. Is there a workaround? Like for example storing a response header value in a variable and then use the variable's value at another request's header automatically? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You can refer this script #385 (comment) This can be a tad bit frustrating to have this pre-request script in your every request. |
Beta Was this translation helpful? Give feedback.
-
I'm on 1.39.0, macos and it seems cookies are not automatically sent for get requests. Is there a way I can validate this? |
Beta Was this translation helpful? Give feedback.
-
cookies are also not being added by requests, well rather they stored per request but what is the use of having the cookies saved if i can't use them in a subsequent request? |
Beta Was this translation helpful? Give feedback.
Hi @skreutzberger
You can refer this script #385 (comment)
This can be a tad bit frustrating to have this pre-request script in your every request.
I am currently working on getting a collection level script support that can do this for all requests #334