Module transport

Available on crate feature dep_ureq only.
Expand description

HTTP/1.1 data transport.

NOTE: transport does not (yet) follow semver.

NOTE: Transport is deep configuration of ureq and is not required for regular use.

ureq provides a pluggable transport layer making it possible to write bespoke transports using the HTTP/1.1 protocol from point A to B. The Agent::with_parts() constructor takes an implementation of the Connector trait which is used for all connections made using that agent.

The DefaultConnector covers the regular needs for HTTP/1.1:

  • TCP Sockets
  • SOCKS-proxy sockets
  • HTTPS/TLS using rustls (feature flag rustls)
  • HTTPS/TLS using native-tls (feature flag native-tls + config)

The Connector trait anticipates a chain of connectors that each decide whether to help perform the connection or not. It is for instance possible to make a connector handling other schemes than http/https without affecting “regular” connections.

Modules§

time
Internal time wrappers

Structs§

ChainedConnector
Two chained connectors called one after another.
ConnectProxyConnector
Connector for CONNECT proxy settings.
ConnectionDetails
The parameters needed to create a Transport.
DefaultConnector
Default connector providing TCP sockets, TLS and SOCKS proxy.
LazyBuffers
Default buffer implementation.
NextTimeout
A pair of Duration and Timeout.
TcpConnector
Connector for regular TCP sockets.
TransportAdapter
Helper to turn a Transport into a std::io Read and Write.

Enums§

Either
A selection between two transports.

Traits§

Buffers
Abstraction over input/output buffers.
Connector
Trait for components providing some aspect of connecting.
Transport
Transport of HTTP/1.1 as created by a Connector.