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§
Sourcefn send_boxed(
&self,
request: ClientRequest,
) -> Pin<Box<dyn Future<Output = Result<ClientResponse, HttpClientError>> + Send + '_>>
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§
impl DynHttpClient for MockHttpClient
impl DynHttpClient for ReqwestHttpClient
Available on crate feature
reqwest only.