-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Set-Cookie header should have a more structured wrapper #1337
Comments
Seems like a good goal. Perhaps |
Yeah, was thinking something like that. So long as you think it's a good direction, I'll take a crack at it. And if the |
Oh and one thing I'm unclear on: how much of the "typed header" stuff will remain in Hyper after switching to the http crate's types? |
Oh, I hadn't noticed the For 0.12, hyper will have removed |
Yeah, that was my thought too. Thinking a bit more, it should be possible to avoid a "commit" step.
What's the timeline for this? Is it worth implementing this against 0.11? |
There is the 0.12 milestone, but in short, it is waiting for any breaking changes for futures and the tokio crates, to be combined with the breaking change of using |
For now, the new version of hyper won't be including the typed headers directly, so I'm closing this here as a won't fix. |
This is an analog of #1145 which was about the
Cookie
header. The current type is a direct wrapper over the vector ofSet-Cookie
headers. From some client uses, it would be nice to have a cookie name based lookup, as well as accessors for the "standard" cookie attributes. For server use, it would be nice to expose a builder-type interface to add cookies and set attributes.It needs some thought to avoid allocations / copies to the degree that makes sense / impossible, but I think the convenience is worth a small penalty for many uses. A possible rough interface:
The text was updated successfully, but these errors were encountered: