Skip to main content

extract_retry_after

Function extract_retry_after 

Source
pub fn extract_retry_after(response: &Response) -> Option<u64>
Expand description

What: Extract Retry-After header value from HTTP response.

Inputs:

  • response: The HTTP response to check for Retry-After header

Output:

  • Option<u64> containing retry-after seconds if header is present and valid

Details:

  • Parses Retry-After header which can be either seconds (u64) or HTTP date
  • Currently only supports seconds format for simplicity
  • Returns None if header is missing or invalid