API reference: @salmonui/data/json
FetchTransportOptionsinterface
import type { FetchTransportOptions } from '@salmonui/data/json';Also exported from @salmonui/data.
interface FetchTransportOptions {
readonly url: string;
readonly fetch?: FetchLike;
readonly headers?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>);
readonly requestInit?: Omit<FetchRequestInit, 'method' | 'body' | 'signal' | 'headers'>;
}
| Name | Signature | Description |
|---|---|---|
url | readonly url: string; | |
fetchoptional | readonly fetch?: FetchLike; | Injected fetch. Defaults to |
headersoptional | readonly headers?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>); | |
requestInitoptional | readonly requestInit?: Omit<FetchRequestInit, 'method' | 'body' | 'signal' | 'headers'>; |