Skip to content

docs: correct inaccurate Retry-After term ("timeout" → "delay")#870

Merged
sindresorhus merged 1 commit into
sindresorhus:mainfrom
xiao-js:pr/2026-06-22-retry-after-doc
Jun 22, 2026
Merged

docs: correct inaccurate Retry-After term ("timeout" → "delay")#870
sindresorhus merged 1 commit into
sindresorhus:mainfrom
xiao-js:pr/2026-06-22-retry-after-doc

Conversation

@xiao-js

@xiao-js xiao-js commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The retry documentation describes the Retry-After header value as a "date, timeout, or timestamp". "timeout" isn't one of the accepted forms.

Per the HTTP spec the value is either a delay in seconds or an HTTP date, and ky additionally treats a large number as a Unix timestamp (source/core/Ky.ts). So the accurate set is delay / date / timestamp.

This replaces the inaccurate "timeout" with "delay" in the readme and the matching JSDoc in source/types/options.ts. Docs-only, no behavior change.

The Retry-After docs described the header value as a "date, timeout, or
timestamp", but "timeout" is not one of the accepted forms. Per the HTTP
spec the value is a delay in seconds or an HTTP date, and Ky additionally
treats a large number as a Unix timestamp (source/core/Ky.ts). Replace the
inaccurate "timeout" with "delay" in the readme and the matching JSDoc.
@sindresorhus sindresorhus merged commit b101251 into sindresorhus:main Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants