HTTP client implementation using Req.
Retry policy
Unless the caller passes :retry explicitly, requests use a custom retry
policy via retry?/2:
- HTTP 429 responses are retried for all methods. BambooHR rate
limits apply per-key regardless of verb, and 429 means the request
was not processed so retrying a POST is safe. The
Retry-Afterheader is honoured by Req's default:retry_delay. - GET and HEAD additionally retry on 408/500/502/503/504 and the
same transient transport errors as Req's
:safe_transientmode. - POST is not retried on 5xx — those could indicate partial processing.
Callers can override by passing retry: in opts (e.g. retry: false
to disable, or a custom function).
Summary
Functions
@spec retry?(Req.Request.t(), Req.Response.t() | Exception.t()) :: boolean()
Retry predicate passed to Req. Returns true to retry, false otherwise.