Internal request options

interface InternalRequest {
    appendToFormData?: boolean;
    auth?: boolean;
    authPrefix?: "Bearer" | "Bot";
    body?: unknown;
    dispatcher?: Agent;
    files?: RawFile[];
    fullRoute: `/${string}`;
    headers?: Record<string, string>;
    method: RequestMethod;
    passThroughBody?: boolean;
    query?: URLSearchParams;
    reason?: string;
    signal?: AbortSignal;
    versioned?: boolean;
}

Hierarchy (View Summary)

Properties

appendToFormData?: boolean

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

auth?: boolean

If this request needs the Authorization header

true

authPrefix?: "Bearer" | "Bot"

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

'Bot'

body?: unknown

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

dispatcher?: Agent

The Agent to use for the request.

files?: RawFile[]

Files to be attached to this request

fullRoute: `/${string}`
headers?: Record<string, string>

Additional headers to add to this request

passThroughBody?: boolean

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

Query string parameters to append to the called endpoint

reason?: string

Reason to show in the audit logs

signal?: AbortSignal

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

versioned?: boolean

If this request should be versioned

true