Optional baseBase URL of fetch. It will be used when the first argument of fetch is relative URL.
Optional fetch?: ReturnType<ReturnFetch>fetch function to be used in returnFetch function.
If not provided, fetch function in global scope will be used.
Any fetch implementation can be used, such as node-fetch, cross-fetch, isomorphic-fetch, etc.
a fetch function created by returnFetch also can be used here.
Optional headers?: HeadersInitDefault headers of fetch. It will be used when the second argument of fetch does not have headers property.
If it is provided and headers also provided when calling a fetch, headers will be merged.
Priority of headers is requestInit.headers > defaultOptions.headers. Duplicated headers will be overwritten.
Optional interceptors?: { Optional request?: ((requestArgs, fetch) => Promise<FetchArgs>)Request interceptor. It will be called before request.
Arguments of fetch function.
the fetch you provided at ['fetch']
Optional response?: ((response, requestArgs, fetch) => Promise<Response>)Response interceptor. It will be called after response.
Response object received from fetch function.
Arguments of fetch function.
the fetch you provided at ['fetch']
Generated using TypeDoc
Options of
returnFetchfunction.