pub struct HttpResponse {
pub status: StatusCode,
pub headers: HeaderMap,
pub body: Vec<u8>,
pub timestamp_ns: TimestampNs,
pub version: Option<u8>,
pub reason: Option<String>,
}Expand description
HTTP response parsed from any HTTP version
Fields§
§status: StatusCodeHTTP status code (200, 404, etc.)
headers: HeaderMapHTTP headers
body: Vec<u8>Response body bytes
timestamp_ns: TimestampNsWhen this response was observed (nanosecond monotonic timestamp)
version: Option<u8>HTTP version: None for HTTP/2, Some(0) for HTTP/1.0, Some(1) for HTTP/1.1
reason: Option<String>Reason phrase: None for HTTP/2, Some(“OK”) etc for HTTP/1
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 · 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