pub struct Request { /* private fields */ }
Expand description
A wrapper for hyper::Request using Url and with methods.
Implementations
sourceimpl Request
impl Request
sourcepub fn new(url: Url, method: Method) -> Request
pub fn new(url: Url, method: Method) -> Request
Create a new request, with given url and method.
sourcepub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Get a mutable reference to the headers.
sourcepub fn with_header<K>(self, key: K, val: HeaderValue) -> Self where
K: IntoHeaderName,
pub fn with_header<K>(self, key: K, val: HeaderValue) -> Self where
K: IntoHeaderName,
Consume self, and return it with the added given header.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more