Skip to content

RESTRequestOptions

Defined in: packages/rest/src/index.ts:134

Options controlling an individual REST request.

The body is positional (post(path, body, options)); these options carry the per-request knobs (query, headers, reason, auth, signal, maxQueueWait).

optional auth?: boolean

Defined in: packages/rest/src/index.ts:144

Set false to omit the Authorization header for this request. Defaults to true.


optional headers?: Record<string, string>

Defined in: packages/rest/src/index.ts:140

Extra request headers merged in (library headers such as Authorization win).


optional maxQueueWait?: number

Defined in: packages/rest/src/index.ts:150

Longest, in ms, this request may wait before it is sent: queued behind its bucket, for a rate limit, or between retries. Past it the request fails with kind "overloaded". Overrides the client’s maxQueueWait.


optional query?: RESTQuery

Defined in: packages/rest/src/index.ts:138

Query-string appended to the path (URLSearchParams, a record, or a raw string).


optional reason?: string

Defined in: packages/rest/src/index.ts:142

Audit-log reason, sent as the X-Audit-Log-Reason header.


optional signal?: AbortSignal

Defined in: packages/rest/src/index.ts:136

Abort signal used to cancel the request and any queued wait.