pub struct Request<'a> {
pub method: Method,
pub url: &'a str,
pub headers: &'a [(&'a str, &'a str)],
pub body: &'a [u8],
pub timeout: Duration,
pub follow: bool,
}Expand description
One request: what a call site asks the client to send.
Fields§
§method: MethodThe method.
url: &'a strThe URL.
headers: &'a [(&'a str, &'a str)]Extra headers, beside the user agent.
body: &'a [u8]The body of a POST.
timeout: DurationThe bound on the whole request, redirects included.
follow: boolWhether a redirect is followed. Where it is not, a 3xx is the answer.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for Request<'a>
impl<'a> Freeze for Request<'a>
impl<'a> Move for Request<'a>
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnsafeUnpin for Request<'a>
impl<'a> UnwindSafe for Request<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more