Crate trillium_client
source · [−]Expand description
trillium client is a http client that uses the same conn
approach as
trillium.
this was primarily built for the
trillium_proxy
crate,
but might end up fitting well into trillium apps for other purposes.
In order to use http keep-alive connection pooling, make requests from
a trillium_client::Client
. To make a one-off request,
build a trillium_client::Conn
directly. Please note that a
trillium_client Conn, while conceptually similar, is different from
trillium::Conn and trillium_http::Conn.
Connector
Client
and Conn
are generic over an implementation of
Connector
. Each runtime crate (trillium_smol
,
trillium_tokio
,
trillium_async_std
) offers
a Connector implementation, which can optionally be combined with a
tls crate (trillium_rustls
and
trillium_native_tls
each offer Connector wrappers.
See the documentation for Client
and Conn
for further usage
examples.