Added version function to RequestBuilder impl (#90)

* Adds version function to RequestBuilder impl

Addresses an issue where the Http version of a request cannot be changed when using reqwest_middleware

* Removes  function from wasm compiles

---------

Co-authored-by: Jeramy Singleton <wisingle@microsoft.com>
pull/91/head
Jeramy Singleton 2023-05-11 08:30:15 -04:00 committed by GitHub
parent 3457bf5702
commit d5e71a0c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -210,6 +210,14 @@ impl RequestBuilder {
} }
} }
#[cfg(not(target_arch = "wasm32"))]
pub fn version(self, version: reqwest::Version) -> Self {
RequestBuilder {
inner: self.inner.version(version),
..self
}
}
pub fn basic_auth<U, P>(self, username: U, password: Option<P>) -> Self pub fn basic_auth<U, P>(self, username: U, password: Option<P>) -> Self
where where
U: Display, U: Display,