Skip to main content

DynHttpClient

Trait DynHttpClient 

Source
pub trait DynHttpClient: Send + Sync {
    // Required method
    fn send_boxed(
        &self,
        request: ClientRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ClientResponse, HttpClientError>> + Send + '_>>;
}
Expand description

Object-safe sibling of HttpClient for container storage.

Required Methods§

Source

fn send_boxed( &self, request: ClientRequest, ) -> Pin<Box<dyn Future<Output = Result<ClientResponse, HttpClientError>> + Send + '_>>

Sends request and returns the response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl DynHttpClient for MockHttpClient

Source§

impl DynHttpClient for ReqwestHttpClient

Available on crate feature reqwest only.