Type Alias Response

Source
pub type Response<T = Body> = Response<T>;
Expand description

Type alias for http::Response whose body type defaults to Body, the most common body type used with rama.

Aliased Type§

pub struct Response<T = Body> { /* private fields */ }

Trait Implementations§

Source§

impl<Body> BodyExtractExt for Response<Body>
where Body: Body<Data: Send + 'static, Error: Into<BoxError>> + Send + 'static,

Source§

async fn try_into_json<T: DeserializeOwned + Send + 'static>( self, ) -> Result<T, OpaqueError>

Try to deserialize the (contained) body as a JSON object.
Source§

async fn try_into_string(self) -> Result<String, OpaqueError>

Try to turn the (contained) body in an utf-8 string.