Skip to main content

CreateRequestBodyOptions

Documentation


Documentation / @discordeno/rest / CreateRequestBodyOptions

Interface: CreateRequestBodyOptions

Defined in: types.ts:215

Properties​

body?​

optional body?: any

Defined in: types.ts:217


files?​

optional files?: FileContent[]

Defined in: types.ts:220


headers?​

optional headers?: Record<string, string>

Defined in: types.ts:216


reason?​

optional reason?: string

Defined in: types.ts:219


signal?​

optional signal?: AbortSignal

Defined in: types.ts:231

An AbortSignal to cancel the request.

Remarks​

Aborting rejects a request that is still waiting in the queue right away and guarantees it is never sent. An attempt that is already in flight gets its connection cancelled as well, though that cannot recall it: Discord (or the proxy) may have received it and may still process it, only the response is discarded. This lets a rest proxy drop requests that nobody is waiting on anymore (client disconnect, deadline) instead of leaving them in the queue.


unauthorized?​

optional unauthorized?: boolean

Defined in: types.ts:218