-
Notifications
You must be signed in to change notification settings - Fork 289
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
Builders don't have a fn to set the header map when the user already has a HeaderMap value. #91
Comments
It is currently possible to set the let mut request = Request::builder()
.method("get")
.body(());
*request.headers_mut() = my_headers; This isn't super ergonomic or discoverable. This issue is flagged as 0.1 as it might require breaking changes if |
We could change |
We could... the |
Maybe something like |
I guess The other option would be to rename the current Also, a thought occurs to me. Currently, |
Something that occurs to me is it doesn't sound like anyone is super convinced by any of the names. It's easy to add in methods later, but hard to fix these after they are added. |
@seanmonstar I'm totally fine punting on adding fns. The real question here is what to do about the Maybe we should just yank it for 0.1 and defer figuring out what that fn should do. |
If we aren't certain that |
As discussed in #91, the exact signature & behavior of `headers` is uncertain. In order to be conservative, this PR removes those functions until we can figure out what it should do exactly.
After removing the |
Currently, the only builder fns are for inserting header entries, but if you just want to set the header map, there is no API for that.
The text was updated successfully, but these errors were encountered: