Represents possible data to be given to an endpoint

interface RequestData {
    body?: unknown;
    file?: File | RawFile;
    headers?: Record<string, string>;
    query?:
        | string
        | URLSearchParams
        | Record<string, string | readonly string[]>
        | Iterable<[string, string]>
        | readonly [string, string][];
}

Hierarchy (view full)

Properties

body?: unknown

The body to send to this request.

file?: File | RawFile

File to be attached to this request

headers?: Record<string, string>

Additional headers to add to this request

query?:
    | string
    | URLSearchParams
    | Record<string, string | readonly string[]>
    | Iterable<[string, string]>
    | readonly [string, string][]

Query string parameters to append to the called endpoint