View as Markdown

API reference: @salmonui/data

FetchRequestInitinterface

import type { FetchRequestInit } from '@salmonui/data';
interface FetchRequestInit {
    readonly method?: string;
    readonly headers?: Readonly<Record<string, string>>;
    readonly body?: string;
    readonly signal?: typeof globalThis extends {
        readonly AbortSignal: {
            readonly prototype: infer S;
        };
    } ? S : AbortSignalLike;
    readonly credentials?: 'omit' | 'same-origin' | 'include';
    readonly [key: string]: unknown;
}
FetchRequestInit members (5)
NameSignatureDescription
methodoptionalreadonly method?: string;
headersoptionalreadonly headers?: Readonly<Record<string, string>>;
bodyoptionalreadonly body?: string;
signaloptionalreadonly signal?: typeof globalThis extends { readonly AbortSignal: { readonly prototype: infer S; }; } ? S : AbortSignalLike;

The request's abort signal: the platform AbortSignal wherever the consumer's lib declares one (the Data Grid engine uses the platform AbortController whenever the runtime has it), else AbortSignalLike.

credentialsoptionalreadonly credentials?: 'omit' | 'same-origin' | 'include';