forked from mirror/reqwest-middleware
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>main
parent
3457bf5702
commit
d5e71a0c89
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue