use capital B for "Basic" and "Bearer" authentication helpers (#332)

This commit is contained in:
Andrey Kutejko
2018-08-29 03:08:59 +02:00
committed by Sean McArthur
parent 2ada485591
commit f26d94d4ac

View File

@@ -220,7 +220,7 @@ impl RequestBuilder {
Some(password) => format!("{}:{}", username, password), Some(password) => format!("{}:{}", username, password),
None => format!("{}:", username) None => format!("{}:", username)
}; };
let header_value = format!("basic {}", encode(&auth)); let header_value = format!("Basic {}", encode(&auth));
self.header(::header::AUTHORIZATION, &*header_value) self.header(::header::AUTHORIZATION, &*header_value)
} }
@@ -239,7 +239,7 @@ impl RequestBuilder {
where where
T: fmt::Display, T: fmt::Display,
{ {
let header_value = format!("bearer {}", token); let header_value = format!("Bearer {}", token);
self.header(::header::AUTHORIZATION, &*header_value) self.header(::header::AUTHORIZATION, &*header_value)
} }