SendRequestOptions
@discordeno/rest • Docs
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
method
method:
RequestMethods
The method to use for sending the request.
Defined in
reject()
reject: (
value
) =>void
Reject handler when a request fails.
Parameters
• value: RestRequestRejection
Returns
void
Defined in
requestBodyOptions?
optional
requestBodyOptions:CreateRequestBodyOptions
Additional request options, used for things like overriding authorization header.
Defined in
resolve()
resolve: (
value
) =>void
Resolve handler when a request succeeds.
Parameters
• value: RestRequestResponse
Returns
void
Defined in
retryCount
retryCount:
number
The amount of times this request has been retried.
Defined in
retryRequest()?
optional
retryRequest: (options
) =>Promise
<void
>
Handler to retry a request should it be rate limited.
Parameters
• options: SendRequestOptions
Returns
Promise
<void
>
Defined in
route
route:
string
The route to send the request to.
Defined in
runThroughQueue?
optional
runThroughQueue:boolean
Whether the request should be run through the queue. Useful for routes which do not have any rate limits.