-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improved set header and set cookie experience #32
Comments
I actually think this is a great idea, but let me take a slightly contrary position for a second... What about the other headers that have encoded information in them that is somewhat hard to parse? I'm particularly thinking of I truly love the idea of adding functionality that makes life easier, but where do we draw the line around that. |
I think each domain will have pros/cons for having a core implementation and to keep the conversations clear I don't want to take on too much at once. We can make individual decisions on what makes sense. |
Next steps on this, as discussed on the meeting, are to look at what an improved experience around the entire header handling in |
Update on next steps: We would like help building a prototype of an improved headers api based on this spec: https://developer.mozilla.org/en-US/docs/Web/API/Headers The goal will be to have a prototype library frameworks can use in the mean time, to help push the conversation forward with core. |
@wesleytodd I already have a small prototype, I could make it public and invite you all to collaborate :) |
Would love to collaborate @delvedor |
@delvedor It would be great, if you can share the repo here. |
Here's the repository :) If you want, I can transfer the repo into the Node.js GitHub org :) |
This effort will be wrapped up in #55. Going to close this up for now. |
In a recent thread on the
cookie
module it became clear that the coresetHeader
api is not very optimal for some use cases. The main issue is that it does not support progressively adding multiple headers of the same name. Theset-cookie
header is the most clear example of this because applications often set multiple cookies in one response.I think there is opportunity to pull some of the behaviors of
cookie
andcookies
into thesetHeader
method. If we were able to "append header" it would help with the progressive addition ofset-cookie
headers.But I wanted to also field the idea of moving a full cookie parsing implementation into node. Is there a clear reason why this is a bad idea? I recognize that small core is a feature, but the ease of a using doing
res.setCookie('token', '...')
seems to be pretty compelling IMO.The text was updated successfully, but these errors were encountered: