Skip to main content

parse_retry_after

Function parse_retry_after 

Source
pub fn parse_retry_after(value: &str) -> Option<Duration>
Expand description

Parse a Retry-After header value.

Accepts the integer-seconds form (Retry-After: 5). The alternate RFC 1123 datetime form isn’t supported; callers requiring it should parse the header themselves.

Returns None for missing or unparseable values, signaling “fall back to exponential backoff” (the same semantic upstream uses when its helper returns nil).