Trait http_adapter::HttpClientAdapter
source · 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>> + '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>> + '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>> + '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