Client
Server
Reference / @open-music-sdk/developer-token / tFetcherOptions
Defined in: fetcher.ts:9
Invalid values throw a TypeError.
readonly optional fetch?: {
(input, init?): Promise<Response>;
(input, init?): Promise<Response>;
};Defined in: fetcher.ts:11
Default: the global fetch. Wrap it to add credentials or headers your endpoint needs.
(input, init?): Promise<Response>;URL | RequestInfo
RequestInit
Promise<Response>
(input, init?): Promise<Response>;string | Request | URL
RequestInit
Promise<Response>
readonly optional refreshAheadSeconds?: number;Defined in: fetcher.ts:13
Fetch a replacement this long before exp. Default, and at most, half the life the token had left when it arrived.
readonly optional timeoutMs?: number;Defined in: fetcher.ts:18
How long the endpoint may take to answer, in whole milliseconds. Default 10 000; at most 2^31 - 1. It holds even when your fetch does not pass the abort signal on.