Module conjure_runtime::raw

source ·
Expand description

“Raw” HTTP client APIs.

The conjure_runtime::Client wraps a raw HTTP client, which is used to handle the actual HTTP communication. A default raw client is provided, but this can be overridden if desired.

§Behavior

The raw client interacts directly with the http::Request and http::Response types, with a body type implementing the http_body::Body trait rather than using the AsyncBody type. The request’s URI is provided in absolute-form, and all headers have already been set in the header map. The HTTP response should be returned directly, without any interpretation of the status code, handling of redirects, etc.

A raw client is expected to implement Service<Request<RawBody>, Response = Response<B>>, where B implements the http_body::Body trait. The error type returned by the client must implement Into<Box<dyn Error + Sync + Send>> and be safe-loggable.

Some configuration set in the Builder affects the raw client, including the connect timeout, security configuration, and proxy configuration. The default raw client respects these settings, but other implementations will need to handle them on their own.

Structs§

Traits§