Expand description
HTTP client helpers shared by every stage that talks to a remote.
All anodizer HTTP traffic should go through blocking_client(...) so that
the User-Agent, default-roots, and timeout policy stay consistent across
publishers, announcers, and the release backends.
Constants§
- USER_
AGENT - Canonical user-agent string sent with every anodizer HTTP request.
Functions§
- async_
client - Async equivalent of
blocking_client. - blocking_
client - Build a blocking
reqwest::Clientconfigured with the canonical UA, the requested per-request timeout, and the platform’s built-in roots. - blocking_
client_ no_ redirect blocking_clientwith redirect-following disabled: a 3xx response is returned to the caller instead of being chased. For probes whose verdict depends on whether a SPECIFIC URL resolves (e.g. a registry version page), silently following a redirect to a different page would misattribute the destination’s body to the requested resource.- body_of
- Read an HTTP response body to a
String, returning a descriptive placeholder on read failure. - body_
of_ blocking - Blocking analogue of
body_of. - body_
read_ error_ message - Format an HTTP body-read failure as a descriptive placeholder string.
- github_
api_ base - Resolve the GitHub REST API base URL through an injected env source.
- github_
api_ base_ with_ config - Like
github_api_base, but honoring a configuredgithub_urls.api(GitHub Enterprise Server) first. - sha256_
url - Download
url(blocking, 5-minute timeout) and return the lowercase-hex SHA-256 of its body — the canonical “fetch a release artifact, hash it” helper for publishers that must fill a digest they were not handed (e.g. the homebrew-core formula bump when nosha256:override is configured).