Search...

RequestData

interface RequestData 
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 Agent 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

Reason to show in the audit logs
Optional

versioned?

:

boolean

If this request should be versioned