HttpClient

Trait HttpClient 

Source
pub trait HttpClient {
    // Required method
    fn send<Op>(
        self,
        ops: Op,
    ) -> impl Future<Output = Result<Response<BodyReader>>>
       where Op: TryInto<HttpClientOptions, Error = Error>;
}
Expand description

An extension trait for Request with addition send method.

Required Methods§

Source

fn send<Op>(self, ops: Op) -> impl Future<Output = Result<Response<BodyReader>>>
where Op: TryInto<HttpClientOptions, Error = Error>,

Consume self and send Request via stream to peer.

On success, returns Response from peer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HttpClient for Request<BodyReader>

Source§

fn send<Op>(self, ops: Op) -> impl Future<Output = Result<Response<BodyReader>>>
where Op: TryInto<HttpClientOptions, Error = Error>,

Implementors§