Expand description
HTTP fetch with a hard body cap and a configurable timeout.
Constants:
MAX_BODY_BYTESโ hard cap on response size (currently 2 MiB).USER_AGENTโ sent asUser-Agentheader; format isagentsec/<cargo-pkg-version>.
The timeout is driven by crate::config::WebConfig::timeout_secs
(default: crate::config::DEFAULT_WEB_TIMEOUT_SECS = 10 s).
Non-2xx responses and oversized bodies are rejected via
crate::Error::Sanitize. The body is not truncated; the request
is failed.
Functionsยง
- get
- Fetch a URL with a 2 MiB body cap and a timeout driven by
timeout_secs.