Trait azure_core::HttpClient

source ·
pub trait HttpClient: Send + Sync + Debug {
    // Required method
    fn execute_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 Request
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn execute_request_check_status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 Request
    ) -> Pin<Box<dyn Future<Output = Result<CollectedResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

An HTTP client which can send requests.

Required Methods§

source

fn execute_request<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 Request ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send out a request using azure_core’s types.

It does not consume the request. Implementors are expected to clone the necessary parts of the request and pass them to the underlying transport.

Provided Methods§

source

fn execute_request_check_status<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 Request ) -> Pin<Box<dyn Future<Output = Result<CollectedResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

DEPRECATED: the status check will be responsibility of another policy (not the transport one). Send out the request and collect the response body. An error is returned if the status is not success.

Implementations on Foreign Types§

source§

impl HttpClient for Client

source§

fn execute_request<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 Request ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§