You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with sending a request whose response contains a set-cookie header. I have two questions:
Is there a way to easily retrieve the cookies post-request? A combination of the current cookies (request header cookie) and all the set-cookies from the response header?
What exactly does the "Store/Send Cookies automatically" do in this case? I have them check but I don't think they're being modified. I also checked the collection settings and the headers tab to see if they were stored there, but there was nothing.
I know I could make a post response that does this and either outputs it into the console or sets a variable, but is there another built-in method? As of writing this, would calling res.getHeader("cookie") return the combination (updated if the keys are the same)?
When copying the values from set-cookie is the format correct? I noticed that there is no ; at the end of a single cookie when there are multiple cookies within that set-cookie header entry. The last property of the cookie is written (SameSite) and after its value (None) it immediately starts with the next cookie key so at time it's difficult to distinguish the cookies.
Example (modified to display each cookie onto a new line):
As you can see, it's all on one line but the problem (is it a problem?) is that there's no separate after it writes one single cookie. The last property doesn't seem to append a ;. This seems like a bug to me, isn't it?
Lastly, I would like to end these questions with a few suggestions if possible with regards to cookies and headers:
Could you separate each cookie within set-cookie headers onto a new line?
Could you give us an option to export the new cookies
It could be as simple as either right-click menu options when right clicking on the set-cookie name box or adding a copy icon under it
It would be nice to have multiple options such as copy raw cookies, copy without properties/attributes, or even copy as JSON/Header/Netscape options
It would also be helpful to copy the combination of response set-cookie + request cookie (updated if the keys are the same)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working with sending a request whose response contains a
set-cookieheader. I have two questions:Is there a way to easily retrieve the cookies post-request? A combination of the current cookies (request header
cookie) and all theset-cookies from the response header?res.getHeader("cookie")return the combination (updated if the keys are the same)?When copying the values from
set-cookieis the format correct? I noticed that there is no;at the end of a single cookie when there are multiple cookies within thatset-cookieheader entry. The last property of the cookie is written (SameSite) and after its value (None) it immediately starts with the next cookie key so at time it's difficult to distinguish the cookies.Example (modified to display each cookie onto a new line):
As you can see, it's all on one line but the problem (is it a problem?) is that there's no separate after it writes one single cookie. The last property doesn't seem to append a
;. This seems like a bug to me, isn't it?Lastly, I would like to end these questions with a few suggestions if possible with regards to cookies and headers:
Could you separate each cookie within
set-cookieheaders onto a new line?Could you give us an option to export the new cookies
set-cookiename box or adding a copy icon under itset-cookie+ requestcookie(updated if the keys are the same)Beta Was this translation helpful? Give feedback.
All reactions