Trait GetRequestBody

Source
pub trait GetRequestBody {
    // Required method
    fn body_bytes<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

A handy extension to hyper::Request that allows for easily reading the request body as a single Bytes object.

Required Methods§

Source

fn body_bytes<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementations on Foreign Types§

Source§

impl<B> GetRequestBody for Request<B>
where B: Body<Data = Bytes> + Send + Sync + 'static, <B as Body>::Error: Into<Error>,

Source§

fn body_bytes<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§