createRateLimitHeaderParser
createRateLimitHeaderParser(
headerNames): (headers) =>RateLimitInfo|undefined
Defined in: packages/core/src/rest/types.ts:96
Creates a rate limit header parser from header name mappings. Eliminates duplication across plugins that use standard limit/remaining/reset headers.
Parameters
Section titled “Parameters”headerNames
Section titled “headerNames”mapping of header names for limit, remaining, and reset
string
remaining
Section titled “remaining”string
string
Returns
Section titled “Returns”a parser function that extracts rate limit info from headers
(
headers):RateLimitInfo|undefined
Parameters
Section titled “Parameters”headers
Section titled “headers”Headers
Returns
Section titled “Returns”RateLimitInfo | undefined
Idempotency
Section titled “Idempotency”Safe — returns a pure function