Skip to main content

Module client

Module client 

Source
Available on crate feature client only.
Expand description

§HTTP client surfaces

Two traits and one implementation of them. HttpClient and HttpClientAsync carry the request surface: implement the two pumps and inherit the commands. HttpClientStd is the opinionated blocking implementation, wrapping a boxed Read + Write + Send stream.

Each send / send_http10 is self-contained, HTTP having no session context. With a TLS feature enabled, HttpClientStd::connect opens http:// / https:// URLs end-to-end via pimalaya_stream::stream::Stream.

Structs§

HttpClientStd
Std-blocking HTTP client wrapping a boxed Read + Write + Send stream.
SseStream
Long-lived HTTP/1.1 Server-Sent Events stream; each SseStream::next_frame / Iterator::next blocks until the next event arrives or the connection closes.

Enums§

HttpClientError
Errors returned by the client surfaces.

Traits§

HttpClient
Blocking HTTP request surface: implement the two pumps and inherit the commands.
HttpClientAsync
Async HTTP request surface, the HttpClient twin for callers whose transport is a future.