Expand description
The client portion of tower-hyper.
The client module contains three main utiliteies client, connection and connect. Connection and Connect are designed to be used together where as Client is a thicker client designed to be used by itself. There is less control over driving the inner service compared to Connection. The other difference is that Connection is a lower level connection, so there is no connection pooling etc, that is the job of the services that wrap it.
§Client Usage
Connect and Connection is a lower level connection based client. This means that
Connect provides a MakeService interface that produces Connection’s. This
is designed to be used in conjunction with tower-http and its set of utilities. Connect
takes a [MakeConnection] that is used to provide the underlying transport. This allows one
to create a TLS secured transport for example or use udp.
Client just wraps hyper’s hyper::Client and provides a simple Service interface.
Structs§
- Builder
- A builder to configure an HTTP connection.
- Client
- The client wrapp for
hyper::Client - Connect
- Creates a
hyperconnection - Connect
Future - A future that resolves to the eventual connection or an error.
- Connection
- The connection provided from
hyper - Response
Future - Lift a hyper ResponseFuture to one which returns a
tower_http::Body.
Enums§
- Connect
Error - The error produced from creating a connection
Traits§
- Connect
Executor - Executor that will spawn the background connection task.