Trait HttpClient

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

A HTTP client abstraction

Required Methods§

Source

fn request( &self, req: Request<BodyWrapper<Bytes>>, ) -> Pin<Box<dyn Future<Output = Result<BytesResponse, Error>> + Send>>

Send the given request and return the response

Implementations on Foreign Types§

Source§

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

Available on crate feature hyper-rustls only.
Source§

fn request( &self, req: Request<BodyWrapper<Bytes>>, ) -> Pin<Box<dyn Future<Output = Result<BytesResponse, Error>> + Send>>

Implementors§