Trait tower_reqwest::util::HttpClientExt

source ·
pub trait HttpClientExt: Clone {
    // Required method
    fn execute<B>(
        &self,
        request: Request<B>
    ) -> impl Future<Output = Result<HttpResponse>>
       where B: Into<HttpBody>;
}
Available on crate feature util only.
Expand description

An extension trait for Tower HTTP services with the typical client methods.

Required Methods§

source

fn execute<B>( &self, request: Request<B> ) -> impl Future<Output = Result<HttpResponse>>
where B: Into<HttpBody>,

Executes an HTTP request.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<S> HttpClientExt for S
where S: Service<Request<HttpBody>, Response = HttpResponse, Error = Error> + Clone + Send + 'static, S::Future: Send + 'static, S::Error: 'static,