pub struct Request { /* private fields */ }Expand description
An HTTP request for Fetcher::send.
Implementations§
Source§impl Request
impl Request
Sourcepub fn header(self, name: HeaderName, value: HeaderValue) -> Request
pub fn header(self, name: HeaderName, value: HeaderValue) -> Request
Add a header. Headers go to the request’s own origin only: a redirect to another scheme, host or port is followed without them.
Host, Content-Length, Transfer-Encoding and the other headers
that belong to the connection rather than the request can’t be set.
Fetcher::send fails with Error::RefusedHeader if you try.
Authorization and Cookie values are marked sensitive.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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