Response

Trait Response 

Source
pub trait Response {
    // Required methods
    fn status(&self) -> StatusCode;
    fn json<'a>(self) -> LocalBoxFuture<'a, Option<Value>>;
    fn headers(&self) -> HeaderMap;
}
Expand description

A generic http response representation with convenience methods for subsequent assertions with Assert.

Required Methods§

Source

fn status(&self) -> StatusCode

Returns the http status code.

Source

fn json<'a>(self) -> LocalBoxFuture<'a, Option<Value>>

Returns a future with the response json body.

Source

fn headers(&self) -> HeaderMap

Returns the response headers.

Implementations on Foreign Types§

Source§

impl Response for Response

Implementors§