Optional
cacheCache settings for fetch.
Optional
credentialsA string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.
Optional
keepWhether to allow the request to outlive the page. Default value is false.
There may be limitations to the payload size, number of concurrent requests, request duration etc. when using keepalive in browsers.
These may change over time, so look for up to date information about these limitations before enabling keepalive.
Optional
requestAn optional function that produces additional RequestInit parameters for each httpRequest.
This is applied last via merging with Object.assign() and overwrites other values set from other sources.
An optional function that produces additional RequestInit parameters for each httpRequest.
This is applied last via merging with Object.assign() and overwrites other values set from other sources.
new Client({
requestHandler: {
requestInit(httpRequest) {
return { cache: "no-store" };
}
}
});
new Client({
requestHandler: {
requestInit(httpRequest) {
return { cache: "no-store" };
}
}
});
Optional
requestThe number of milliseconds a request can take before being automatically terminated.
Represents the http options that can be passed to a browser http client.