-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impl CookieStore? #42183
Comments
@jimmywarting the primary issue with something like this is that Node programs often serve multiple users (e.g. http servers) whereas web APIs are built for single-tenancy. The web API doesn't currently allow There definitely is the case for http clients in Node finding this useful though given the web API doesn't expose |
To be honest i don't even know if it would fit in nodejs also as you mention "it serve multiple users" you would kind of have to construct a new CookieStore for each and every user then. but i created this issue just to discuss/explore if it is reasonably But for things that don't work with multiple users, like a Slack, Twitter or Github client you might just only need one cookie store to communicate with one api. it's true that CookieStore ins't constructible, but would mean that we would have to be restricted to the same rule as the browser.
what do you mean? CookieStore is exposed globally (but just in secure contexts)
CookieStore dosen't have to be based on |
I personally think it makes sense. Most of my apps do not make HTTP requests on behalf of the user, even in the context of responding to them. Usually they talk to internal web services and use the same credentials regardless of the user that triggered the request. |
it would have been nice if you didn't need a cookie jar plugin or something like fetch-cookie to intercept all redirects and having to reimplement all redirect logic yourself and changing maybe CookieStore dose not have to be constructable in the same way... maybe we could create some util that give us some new instances of a CookieStore |
Thanks, I tested in example.com -_- I think experimentation is worth exploring then and support in undici |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
Please keep open |
What is the status? |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
Keep open |
What is the problem this feature will solve?
Cookie parsing and serializing is tuff. Most often you need a cookie plugin for whatever reason and dose are downloaded milion of times / week on npm
Adding a memory based CookieStore that can be constructed using
new CookieStore()
in some form would be beneficial. I'm just imagining http, https, http2 and fetch to have support for passing in own custom CookieStore parameter somewhere for it to be used somehowThe text was updated successfully, but these errors were encountered: