pub trait HttpClient: Send + Sync + Debug {
    // Required method
    fn http_connector(
        &self,
        settings: &HttpConnectorSettings,
        components: &RuntimeComponents
    ) -> SharedHttpConnector;
}
Expand description

HTTP client abstraction.

A HTTP client implementation must apply connect/read timeout settings, and must maintain a connection pool.

Required Methods§

source

fn http_connector( &self, settings: &HttpConnectorSettings, components: &RuntimeComponents ) -> SharedHttpConnector

Returns a HTTP connector based on the requested connector settings.

The settings include connector timeouts, which should be incorporated into the connector. The HttpClient is responsible for caching the connector across requests.

In the future, the settings may have additional parameters added, such as HTTP version, or TLS certificate paths.

Implementors§