Type Alias ApiCallOptions

Additional options for an api call done with invoke-fetch

type ApiCallOptions = {
    headers?: Record<string, string>;
    hostConfig?: HostConfig;
    keepalive?: boolean;
    maxCacheAge?: number;
    noCache?: boolean;
    progress?: ProgressOptions;
    signal?: AbortSignal;
    timeoutMs?: number;
    useCacheIfAfter?: Date;
}
Index

Properties

headers?: Record<string, string>

Additional headers to pass on to the request.

hostConfig?: HostConfig

Specify the host config if the api call is a cross-domain request. Typically used in embedding and mashups

keepalive?: boolean

Ensure that the request is kept alive even if the page that initiated it is unloaded before the request is completed.

maxCacheAge?: number

Only used cached results whose age in milliseconds are less than that or equal to maxCacheAge.

noCache?: boolean

if set to true the call will not use a cached result

progress?: ProgressOptions

Options for progress-reporting. Specify any combination of the callbacks onUpload and onDownload. Progress will be reported continuously.

signal?: AbortSignal

An abort-signal lets you abort an ongoing fetch request. The abort-signal is created by taking the .signal property of an AbortController.

timeoutMs?: number

Set the amount of time to wait for a response. If the timeout is exceeded the request is aborted. If both timeoutMs and signal is present, timeoutMs will have no effect, as there is already an abort-signal specified.

useCacheIfAfter?: Date

Only results cached on or after the ifCachedSince timestamp are used.