Skip to main content

CreateRequestBodyOptions

Documentation


Documentation / @discordeno/rest / CreateRequestBodyOptions

Interface: CreateRequestBodyOptions

Defined in: types.ts:3489

Properties

body?

optional body?: any

Defined in: types.ts:3491


files?

optional files?: FileContent[]

Defined in: types.ts:3494


headers?

optional headers?: Record<string, string>

Defined in: types.ts:3490


reason?

optional reason?: string

Defined in: types.ts:3493


signal?

optional signal?: AbortSignal

Defined in: types.ts:3505

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:3492