RateSignalsReader
Turns a response into the RateSignals the budget acts on. A consumer supplies a per-provider reader for the headers and counts its provider sends.
Experimental (implement). Implementing needs @OptIn(ExperimentalForInheritanceWebToolsApi::class); calling it and passing it are Stable Core, and Standard needs no opt-in. An implementation never throws for bad input: it returns RateSignals.None (or the part it could read). It must be safe for concurrent calls.
Inheritors
Types
The reader for providers that follow RFC 9110: a 429 is throttled (with or without Retry-After); a 503 is throttled only when a Retry-After parses; every other status is RateSignals.None. It parses every line of the Retry-After header and takes the longest wait among those that parse; it reads the response's Date and, when that parses as an HTTP-date, measures a date-valued Retry-After against it, else against nowEpochMillis. It reports no window readings.