Skip to main content

SendRequestOptions

@discordeno/restDocs


Documentation / @discordeno/rest / SendRequestOptions

Interface: SendRequestOptions

Properties

bucketId?

optional bucketId: string

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

Defined in

rest/src/types.ts:3153


method

method: RequestMethods

The method to use for sending the request.

Defined in

rest/src/types.ts:3143


reject()

reject: (value) => void

Reject handler when a request fails.

Parameters

value: RestRequestRejection

Returns

void

Defined in

rest/src/types.ts:3151


requestBodyOptions?

optional requestBodyOptions: CreateRequestBodyOptions

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

Defined in

rest/src/types.ts:3155


resolve()

resolve: (value) => void

Resolve handler when a request succeeds.

Parameters

value: RestRequestResponse

Returns

void

Defined in

rest/src/types.ts:3149


retryCount

retryCount: number

The amount of times this request has been retried.

Defined in

rest/src/types.ts:3145


retryRequest()?

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

Handler to retry a request should it be rate limited.

Parameters

options: SendRequestOptions

Returns

Promise<void>

Defined in

rest/src/types.ts:3147


route

route: string

The route to send the request to.

Defined in

rest/src/types.ts:3141


runThroughQueue?

optional runThroughQueue: boolean

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

Defined in

rest/src/types.ts:3160