Expand description
The installer’s only HTTP client: WinHTTP, whose TLS is the OS’s own Schannel. Blocking, so it runs on the worker thread, never the UI thread.
Re-exports§
pub use http_error::HttpError;
Modules§
Constants§
- CHUNK_
SIZE 🔒 - Small enough that Cancel is noticed promptly.
- MAX_
BUFFERED_ 🔒BYTES - What
getholds in memory: far beyond any real manifest, which runs to kilobytes, and small enough that a server sending without end cannot exhaust the machine; that the documents are small is the server’s promise, not ours. - MAX_
REDIRECTS 🔒 - Enough for a host move followed by a path rewrite, and a loop ends in milliseconds rather than on the timeout.
- TIMEOUT_
CONNECT_ 🔒MS - TIMEOUT_
RECEIVE_ 🔒MS - TIMEOUT_
RESOLVE_ 🔒MS - Without timeouts a dead server parks the worker forever, since Cancel is only noticed between chunks.
- TIMEOUT_
SEND_ 🔒MS - USER_
AGENT 🔒 - The server’s access log records it, so a report can be traced to the build that sent it.
Functions§
- get
- The whole body in memory, up to
MAX_BUFFERED_BYTES: right for a manifest, wrong for a package zip. - get_
streaming - Hands each chunk to
sinkas it arrives;sinkreturns false to abort. The bearer token is a credential and is never logged. - post_
json - Posts JSON without a token, since what the installer sends carries no identity, and discards the response body.
- read_
body 🔒 - read_
response 🔒 - redirect_
location 🔒 - The
Locationof a 3xx, whose body is never read: it belongs to a response the caller is not getting, and would otherwise land in a package file. - send 🔒
- Follows redirects itself, since WinHTTP left to itself re-sends the bearer token to whatever origin a 3xx names (measured 2026-10-30).
Type Aliases§
- Progress
Fn (bytes_so_far, content_length); the length isNonefor a chunked response.