pub trait HttpClient: Send + Sync {
// Required method
fn execute<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Trait for executing HTTP requests in a runtime-agnostic way
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Executes a given HTTP request and returns the response.