One attempt about to start, passed to ClientConfig::on_attempt. url has configured
and per-request secret values replaced by [redacted] and any query or userinfo removed.
One finished transport hop, reported to Client::on_attempt_outcome exactly once
per physical transport attempt that passed the ClientConfig::on_attempt gate, including the
terminal one. It is observed before the response body is read. Sanitized like every
other event surface: url has configured and per-request secret values replaced by
[redacted] and any query or userinfo removed, headers are a copy with
credential-named values (including Set-Cookie and Authorization) replaced and
recorded secret values scrubbed, error text is scrubbed the same way, and no body
ever appears. attempt groups redirect hops within one retry. delivery describes
only this hop (a refused connect on a redirect hop is NotSent for that hop): a later
NotSent never makes an earlier responded POST safe to replay, and the call’s error and
retry decision still treat the whole redirect chain as possibly delivered.
Redirect responses report before target validation; their next_delay is None.
Only the final hop can carry a retry delay. A pre-send validation or policy refusal
reports no outcome; earlier hop outcomes remain available.
Which proxy source a client actually ended up with, as opposed to the ProxyMode it was
asked for. Differs from the request only for ProxyMode::System when the operating
system configures automatic detection and nothing else.
Inverse of percent_encode_component: decodes %XX escapes and leaves + as written.
An escape that is not two hex digits is kept as written; invalid UTF-8 is replaced.
RFC 3986 percent-encoding for one URL path segment or query value. Unreserved bytes
(A-Z a-z 0-9 - . _ ~) are kept, a space becomes %20 (never +), and every other byte
becomes %XX. Use percent_encode only for application/x-www-form-urlencoded bodies.