Many APIs return a Retry-After header when responding with HTTP 429 Too Many Requests.
SmoothAPI currently applies exponential backoff for retries, but does not respect server-provided retry instructions.
This feature should parse and honor the Retry-After header whenever available.
Example
HTTP/1.1 429 Too Many Requests
Retry-After: 30
SmoothAPI should wait 30 seconds before retrying instead of using the calculated backoff delay.
Acceptance Criteria
- Parse the
Retry-After header
- Support numeric values
- Fall back to existing backoff behavior when the header is missing
- Add test coverage
- Update documentation if required
Notes
This change should preserve existing behavior when no Retry-After header is present
Many APIs return a
Retry-Afterheader when responding with HTTP429 Too Many Requests.SmoothAPI currently applies exponential backoff for retries, but does not respect server-provided retry instructions.
This feature should parse and honor the
Retry-Afterheader whenever available.Example
HTTP/1.1 429 Too Many Requests
Retry-After: 30
SmoothAPI should wait 30 seconds before retrying instead of using the calculated backoff delay.
Acceptance Criteria
Retry-AfterheaderNotes
This change should preserve existing behavior when no
Retry-Afterheader is present