Expand description
The shared HTTP agent (REQ-31), the error type the clients return, and the retry after HTTP 401 (REQ-22).
Modules§
- status
- The HTTP statuses the clients map, named so the mapping code holds no bare numbers.
Structs§
- Invalid
Url - The supplied service URL was not a plain HTTPS origin and path.
Enums§
- Error
- A failed request. No variant holds a credential.
Constants§
- ERROR_
BODY_ BYTES - The body limit for an error message or another small body (64 KiB).
- MAX_
BODY_ BYTES - The body limit for a response that may be large (64 MiB).
- TIMEOUT
Functions§
- agent
- One agent for every client: the platform certificate store (so a proxy
certificate the system trusts is accepted),
HTTPS_PROXYandNO_PROXYfrom the environment, and a 30 s timeout. A failure status is returned as a response, so a client can read the service’s error message. - plain_
https_ url - Checks a service base URL:
https, no credentials, query or fragment. Returns the origin and path without a trailing slash. - send_
with_ retry - Sends a request with a credential from
credential. After HTTP 401 it drops the credential, gets one again and retries once (REQ-22). A second 401 also drops the credential and is returned to the caller.