pub struct HttpRequest {
pub method: Method,
pub url: String,
pub headers: HeaderMap,
pub body: Option<Vec<u8>>,
}Expand description
One request, as the client hands it to a Transport.
Debug shows the method, URL and header names only: the values carry
credentials and the body carries keys and plaintexts.
Fields§
§method: MethodThe method.
url: StringThe absolute URL.
headers: HeaderMapEvery header the client sets, credentials included.
body: Option<Vec<u8>>The JSON body, when there is one.
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Auto Trait Implementations§
impl Forget for HttpRequest
impl Freeze for HttpRequest
impl Move for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnsafeUnpin for HttpRequest
impl UnwindSafe for HttpRequest
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