pub struct Response {
pub version: HttpVersion,
pub status: u32,
pub headers: HeaderVec,
pub body: Vec<u8>,
pub duration: Duration,
pub url: String,
pub certificate: Option<Certificate>,
}
Expand description
Represents a runtime HTTP response. This is a real response, that has been executed by our HTTP client.
Fields§
§version: HttpVersion
§status: u32
§headers: HeaderVec
§body: Vec<u8>
§duration: Duration
§url: String
§certificate: Option<Certificate>
The end-user certificate, in the response certificate chain
Implementations§
source§impl Response
impl Response
sourcepub fn log_body(&self, debug: bool, logger: &mut Logger)
pub fn log_body(&self, debug: bool, logger: &mut Logger)
Log a response body as text if possible, or a slice of body bytes.
pub fn log_info_all(&self, logger: &mut Logger)
sourcepub fn get_status_line_headers(&self, color: bool) -> String
pub fn get_status_line_headers(&self, color: bool) -> String
Returns status, version and HTTP headers from this HTTP response.
Trait Implementations§
source§impl PartialEq for Response
impl PartialEq for Response
impl Eq for Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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