pub struct HttpResponse {
pub status: HttpStatusCode,
pub version: String,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
}Expand description
An incoming HTTP response. Header names are stored lowercase.
Fields§
§status: HttpStatusCodeThe response status code.
version: StringThe protocol version token found on the status line.
headers: Vec<(String, String)>The response headers, in order, names lowercased.
body: Vec<u8>The response body, decoded when chunked.
Implementations§
Source§impl HttpResponse
impl HttpResponse
Sourcepub fn challenges(&self) -> Vec<HttpChallenge>
pub fn challenges(&self) -> Vec<HttpChallenge>
Parses the challenges of every WWW-Authenticate header of the
response, in order.
Trait Implementations§
Source§impl Clone for HttpResponse
impl Clone for HttpResponse
Source§fn clone(&self) -> HttpResponse
fn clone(&self) -> HttpResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnsafeUnpin for HttpResponse
impl UnwindSafe for HttpResponse
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