pub trait HttpClient: Send + Sync + 'static {
    // Required method
    fn request(
        &self,
        req: Request<Body>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Body>>> + Send>>;
}
Expand description

A HTTP client based on hyper::Client

Required Methods§

source

fn request( &self, req: Request<Body> ) -> Pin<Box<dyn Future<Output = Result<Response<Body>>> + Send>>

Send the given request and return the response

Implementations on Foreign Types§

source§

impl<C> HttpClient for Client<C>
where C: Connect + Clone + Send + Sync + 'static,

source§

fn request( &self, req: Request<Body> ) -> Pin<Box<dyn Future<Output = Result<Response<Body>>> + Send>>

Implementors§