Skip to main content

SendRequestOptions

Documentation


Documentation / @discordeno/rest / SendRequestOptions

Interface: SendRequestOptions

Defined in: types.ts:3303

Properties

bucketId?

optional bucketId?: string

Defined in: types.ts:3317

If this request has a bucket id which it falls under for rate limit


method

method: RequestMethods

Defined in: types.ts:3307

The method to use for sending the request.


reject

reject: (value) => void

Defined in: types.ts:3315

Reject handler when a request fails.

Parameters

value

RestRequestRejection

Returns

void


requestBodyOptions?

optional requestBodyOptions?: CreateRequestBodyOptions

Defined in: types.ts:3319

Additional request options, used for things like overriding authorization header.


resolve

resolve: (value) => void

Defined in: types.ts:3313

Resolve handler when a request succeeds.

Parameters

value

RestRequestResponse

Returns

void


retryCount

retryCount: number

Defined in: types.ts:3309

The amount of times this request has been retried.


retryRequest?

optional retryRequest?: (options) => Promise<void>

Defined in: types.ts:3311

Handler to retry a request should it be rate limited.

Parameters

options

SendRequestOptions

Returns

Promise<void>


route

route: string

Defined in: types.ts:3305

The route to send the request to.


runThroughQueue?

optional runThroughQueue?: boolean

Defined in: types.ts:3324

Whether the request should be run through the queue. Useful for routes which do not have any rate limits.