pub fn parse_retry_after(value: &str) -> Option<Duration>Expand description
Parse a Retry-After header value. Upstream’s
errors.NewRetriableLaterError accepts two forms; we accept only
the first today:
- Integer seconds (delta-seconds), e.g.
Retry-After: 5. - RFC 1123 datetime (deferred — the test server only emits integer seconds, and HTTP-date support adds a date-parsing dependency we don’t otherwise need).
Returns None for missing or unparseable values. None means “fall
back to exponential backoff” — same semantic upstream uses when the
helper returns nil.