[][src]Trait static_http_cache::reqwest_mock::HttpResponse

pub trait HttpResponse: Read + Debug where
    Self: Sized
{ fn headers(&self) -> &HeaderMap;
fn status(&self) -> StatusCode;
fn error_for_status(self) -> Result<Self, Box<dyn Error>>; }

Represents the result of sending an HTTP request.

Modelled after reqwest::Response.

Required methods

fn headers(&self) -> &HeaderMap

Obtain access to the headers of the response.

fn status(&self) -> StatusCode

Obtain a copy of the response's status.

fn error_for_status(self) -> Result<Self, Box<dyn Error>>

Return an error if the response's status is in the range 400-599.

Loading content...

Implementations on Foreign Types

impl HttpResponse for Response[src]

Loading content...

Implementors

Loading content...