ApiClientOptions
type ApiClientOptions = object;Defined in: types.ts:13
Properties
Section titled “Properties”apiPrefix?
Section titled “apiPrefix?”optional apiPrefix?: string;Defined in: types.ts:17
The base path for the JSON:API endpoint
authentication?
Section titled “authentication?”optional authentication?: Authentication;Defined in: types.ts:40
The authentication configuration to use for authenticated API requests.
cache?
Section titled “cache?”optional cache?: Cache;Defined in: types.ts:23
Default cache implementation Cache
customFetch?
Section titled “customFetch?”optional customFetch?: (input, init?) => Promise<Response>;Defined in: types.ts:32
Custom fetch method overrides fetch in the ApiClient
Parameters
Section titled “Parameters”RequestInfo | URL
input to the customFetch
RequestInit
additional configuration for the request like the method to use, headers, etc.
Returns
Section titled “Returns”a Response wrapped in a promise
https://developer.mozilla.org/en-US/docs/Web/API/fetch
debug?
Section titled “debug?”optional debug?: boolean;Defined in: types.ts:67
If true, logs debug messages to the console.
defaultLocale?
Section titled “defaultLocale?”optional defaultLocale?: Locale;Defined in: types.ts:46
The default locale to use for all API requests.
logger?
Section titled “logger?”optional logger?: { [key in LogLevels]?: LogMethod };Defined in: types.ts:57
Represents a logger object with optional logging methods for various log levels.
serializer?
Section titled “serializer?”optional serializer?: Serializer;Defined in: types.ts:52
Custom serializer to use for deserializing api response.