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§
Sourcefn status(&self) -> StatusCode
fn status(&self) -> StatusCode
Returns the http status code.
Sourcefn json<'a>(self) -> LocalBoxFuture<'a, Option<Value>>
fn json<'a>(self) -> LocalBoxFuture<'a, Option<Value>>
Returns a future with the response json body.