Preview environment

interface RequestData

export interface RequestData

Represents possible data to be given to an endpoint

optional
appendToFormData? : boolean

Whether to append JSON data to form data instead of payload_json when sending files

optional
auth? : boolean

If this request needs the Authorization header

optional
authPrefix? : 'Bearer' | 'Bot'

The authorization prefix to use for this request, useful if you use this with bearer tokens

optional
body? : BodyInit | unknown

The body to send to this request. If providing as BodyInit, set passThroughBody: true

optional
dispatcher? : Agent

The Agentundefined to use for the request.

optional
files? : RawFile[] | undefined

Files to be attached to this request

optional
headers? : Record<string, string>

Additional headers to add to this request

optional
passThroughBody? : boolean

Whether to pass-through the body property directly to fetch(). This only applies when files is NOT present

optional
query? : URLSearchParams

Query string parameters to append to the called endpoint

optional
reason? : string | undefined

Reason to show in the audit logs

optional
signal? : AbortSignal | undefined

The signal to abort the queue entry or the REST call, where applicable

optional
versioned? : boolean

If this request should be versioned