Http module

too_many_requests

procedureextensionexperimentalSource

An Http_Error with status 429, for when the caller is over a rate limit; add Retry-After with with_header. format and args make the detail text as tprint does, in the temporary allocator.

Example
error := with_header(too_many_requests("slow down"), "Retry-After", "30");
assert(error.status == 429 && error.headers.count == 1);

Doesn't run in the browser (skipped on wasm).

too_many_requests :: (format := "", args: ..Any) -> Http_Error

Parameters

format := ""
args: ..Any

Returns

See also