Trait HttpClient

Source
pub trait HttpClient: Send {
    // Required method
    fn send_http(
        &self,
        request: Request<Vec<u8>>,
    ) -> impl Future<Output = Result<Response<Vec<u8>>, Box<dyn Error + Send + Sync + 'static>>> + Send;
}
Expand description

An abstract HTTP client.

Required Methods§

Source

fn send_http( &self, request: Request<Vec<u8>>, ) -> impl Future<Output = Result<Response<Vec<u8>>, Box<dyn Error + Send + Sync + 'static>>> + Send

Send an HTTP request and return the response.

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.

Implementors§