Skip to main content

HttpClient

Trait HttpClient 

Source
pub trait HttpClient: Send + Sync {
    // Required method
    fn send<'life0, 'async_trait>(
        &'life0 self,
        request: Request,
    ) -> Pin<Box<dyn Future<Output = Result<Response, ScopeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait implemented by both the native reqwest client and the ghola sidecar client. Scope selects the implementation at startup based on the ghola.enabled flag in config.yaml.

Required Methods§

Source

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

Sends an HTTP request and returns the response.

Implementors§