Skip to main content

Module request

Module request 

Source
Expand description

Request: the on-disk shape of one request, its parsing/validation, and Method. The three “structured input becomes the final wire form” passes — Request::resolve_query, Request::resolve_body, Request::resolve_auth — live in resolve, each field’s own type lives in multipart/auth, and the repeated-header (de)serializers live in headers (private: only Request’s own #[serde(...)] attributes need them).

Modules§

auth
Auth/BasicAuth/ApiKeyAuth: crate::Request::auth’s shape, resolved to a header or query parameter by crate::Request::resolve_auth.
multipart
MultipartPart and the hand-rolled multipart/form-data encoder crate::Request::resolve_body uses for crate::Request::multipart.
resolve
The three “structured input becomes the final wire form” passes, run in this order: Request::resolve_auth, Request::resolve_query and Request::resolve_body. Each returns a new Request with its own structured field(s) cleared and the plain wire-level field (url, body/headers, Authorization header) set instead — see each method’s own doc comment for why the order among them and relative to the config and pre_request matters.

Structs§

Request
A single request, as described by one YAML file.
RetryConfig
How many extra times to try a request, and how long to wait between attempts, when it fails to get any response — see Request::retry.

Enums§

Method
HTTP methods Sendra can send. Deliberately a closed set for now — an arbitrary-method escape hatch can be added when something needs it.