Expand description
Retry policies for transport and HTTP failures.
Configure on ClientBuilder::retry or per-request
RequestBuilder::retry.
On RequestBuilder::send_stream, HTTP retries use status
and headers without reading the body. When a custom ShouldRetryFn is
set, the client peeks up to ClientBuilder::retry_body_peek_bytes
(default 64 KiB, capped by ClientBuilder::max_response_bytes when set).
The peek is replayed on the stream returned to the caller; only a confirmed retry or
RequestBuilder::throw_on_error(true) drains the body.
Enums§
- Retry
Policy - Retry policy configuration.
Functions§
- default_
should_ retry - Default HTTP status codes that trigger a retry when no custom predicate is set.
- parse_
retry_ after - Parses
Retry-Afteras a delay.
Type Aliases§
- Should
Retry Fn - Predicate for whether a response should be retried.