You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand correctly, we call it again in retry, in order to reload token from file,
so it should be an overwrite of the old header value.
but the impl in reqwest is append
#[tokio::main]
async fn main() {
let client = reqwest::Client::new();
let mut req = client.delete("http://httpbin.org/delete")
.header(reqwest::header::AUTHORIZATION, "password") // .basic_auth almost do the same, except is_sensitive
.header(reqwest::header::AUTHORIZATION, "password2")
.build().unwrap();
println!("{:?}", req.headers());
req.headers_mut().insert(reqwest::header::AUTHORIZATION, reqwest::header::HeaderValue::from_static("password3"));
println!("{:?}", req.headers());
}
print:
Standard Output
{"authorization": "password", "authorization": "password2"}
{"authorization": "password3"}
The text was updated successfully, but these errors were encountered:
youngsofun
changed the title
bug: call self.auth.wrap(builder) not work as what we expect.
bug: call self.auth.wrap(builder) when retry not work as what we expect.
Aug 22, 2024
If I understand correctly, we call it again in retry, in order to reload token from file,
so it should be an overwrite of the old header value.
but the impl in reqwest is
append
print:
The text was updated successfully, but these errors were encountered: