Available on crate feature
client only.Expand description
HTTP client library for Rust, built on top of hyper.
There are three levels of available APIs in this library:
- The high-level
ClientAPI, which is the most user-friendly and abstracts away most of the details. It is “batteries-included”, and supports features like redirects, retries and timeouts. - The
ServiceAPI, which is a lower-level API that allows for more control over the request and response. It presents atower::Servicethat can be used to send requests and receive responses, and can be wrapped by middleware compatible with the tower ecosystem. - The connection API, which is the lowest-level API that allows for direct control over the transport and protocol layers. This API is useful for implementing custom transports or protocols, but might be difficult to directly use as a client.
Re-exports§
pub use self::pool::Config as PoolConfig;
Modules§
- Client connection types.
- Connection Pooling for Clients
Structs§
- A builder for a client.
- A high-level async HTTP client.
- Layer which adds connection pooling and converts to an inner service which accepts
ExecuteRequestfrom an outer service which acceptshttp::Request. - A service which gets a connection from a possible connection pool and passes it to an inner service to execute that request.
Enums§
- Client error type.
Functions§
- Get a default TLS client configuration by loading the platform’s native certificates.
Type Aliases§
- A boxed service with http::Request and http::Response and symmetric body types