pub trait HttpClientAdapter {
type Error;
// Required method
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Adapter to allow different HTTP clients to be used to issue an HTTP request. To properly implement this trait, use async_trait.
Required Associated Types§
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the specified URL using the specified request method
Returns the text contents of the resource located at the indicated URL
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".