pub trait HttpClient: Debug + Send + Sync {
    fn send<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Vec<u8>>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, HttpError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

A minimal interface necessary for export spans over HTTP.

Users sometime choose HTTP clients that relay on a certain async runtime. This trait allows users to bring their choice of HTTP client.

Required methods

Send the specified HTTP request

Returns the HTTP response including the status code and body.

Returns an error if it can’t connect to the server or the request could not be completed, e.g. because of a timeout, infinite redirects, or a loss of connection.

Implementors