Skip to content

How can Response not set cookies in responses? #2328

Answered by kettanaito
zwhitchcox asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @zwhitchcox. That comment references the forbidden cookie names as per the Fetch API spec, which includes the Set-Cookie. That limitation applies everywhere you have a faithful Fetch API implementation. Server-side implementations ignore certain aspects of the spec so you can set the cookie header in Node.js.

MSW provides a universal HttpResponse class that allows for the Set-Cookie header anywhere.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kettanaito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants