Expand description
Crate-wide outbound HTTP agent constructors.
Every outbound call must carry a hard deadline: a stalled remote must
FAIL, never hang the wizard. Bare ureq::get/post(...) calls have no
default timeout in ureq 3 — do not add new ones; construct an agent here
instead so the deadline policy stays in one place.
Constants§
- API_
TIMEOUT - Hard deadline for interactive API calls (OAuth token/device-code exchanges, Microsoft Graph, provider setup steps). Generous enough for slow provider backends; small enough that a wedged connection surfaces as an error while the operator is still watching.
- DOWNLOAD_
TIMEOUT - Hard deadline for potentially large downloads (bundle archives, tunnel binaries). Caps the entire transfer, not just connect.
Functions§
- api_
agent - Agent for API calls with ureq’s default status handling (non-2xx becomes
Err(ureq::Error::StatusCode(..))) — drop-in for bareureq::calls. - api_
agent_ any_ status - Agent for API calls where non-2xx statuses are handled as regular
responses (
http_status_as_error(false)) — drop-in for call sites that inspect status codes themselves (OAuth polling, Graph error bodies). - download_
agent - Agent for downloads: same failure semantics, longer transfer budget.