8000 Implement Set-Cookie handling by LinusU · Pull Request #1472 · JakeChampion/fetch · GitHub
[go: up one dir, main page]

Skip to content

Implement Set-Cookie handling#1472

Open
LinusU wants to merge 1 commit intoJakeChampion:mainfrom
LinusU:getSetCookie
Open

Implement Set-Cookie handling#1472
LinusU wants to merge 1 commit intoJakeChampion:mainfrom
LinusU:getSetCookie

Conversation

@LinusU
Copy link
@LinusU LinusU commented Oct 15, 2024

Fixes #1384

Specification: https://fetch.spec.whatwg.org/#dom-headers-getsetcookie

Why is this needed since the browsers doesn't expose Set-Cookie? React Native is using this polyfill to provide fetch, and it does expose the Set-Cookie header.


An alternative implementation would be to store the set-cookie headers separately from the map variable. Please let me know if you would prefer that, and I'll update the code.

Copy link
@opmdod360-max opmdod360-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better

@opmdod360-max
Copy link

Fixes #1384

Specification: https://fetch.spec.whatwg.org/#dom-headers-getsetcookie

Why is this needed since the browsers doesn't expose Set-Cookie? React Native is using this polyfill to provide fetch, and it does expose the Set-Cookie header.

An alternative implementation would be to store the set-cookie headers separately from the map variable. Please let me know if you would prefer that, and I'll update the code.

There you go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set-Cookie headers should not be combined / Support Headers.getSetCookie() method

2 participants

0