HttpRequest

Trait HttpRequest 

Source
pub trait HttpRequest<B>
where B: Body,
{ // Required methods fn send_request<'life0, 'async_trait>( &'life0 mut self, req: Request<B>, ) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ready<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }
Expand description

Send HTTP requests

Required Methods§

Source

fn send_request<'life0, 'async_trait>( &'life0 mut self, req: Request<B>, ) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send an HTTP request and return the response

Source

fn ready<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wait until the connection is ready to send requests

Implementors§

Source§

impl<B> HttpRequest<B> for HttpForwarderService<B>
where B: Body<Data = Bytes, Error = Infallible> + Send + 'static,