Standard

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.

Stable Core. Final and stateless; usable without the opt-in; toString() is RateSignalsReader.Standard. It is the worked example of the seam.

Functions

Link copied to clipboard
open override fun read(response: HttpResponse, nowEpochMillis: Long): RateSignals

Reads one response.

Link copied to clipboard
open override fun toString(): String

Returns the fixed text RateSignalsReader.Standard, for diagnostics and logs.