Skip to content

ApiClientOptions

type ApiClientOptions = object;

Defined in: types.ts:13

optional apiPrefix?: string;

Defined in: types.ts:17

The base path for the JSON:API endpoint


optional authentication?: Authentication;

Defined in: types.ts:40

The authentication configuration to use for authenticated API requests.


optional cache?: Cache;

Defined in: types.ts:23

Default cache implementation Cache


optional customFetch?: (input, init?) => Promise<Response>;

Defined in: types.ts:32

Custom fetch method overrides fetch in the ApiClient

RequestInfo | URL

input to the customFetch

RequestInit

additional configuration for the request like the method to use, headers, etc.

Promise<Response>

a Response wrapped in a promise

https://developer.mozilla.org/en-US/docs/Web/API/fetch


optional debug?: boolean;

Defined in: types.ts:67

If true, logs debug messages to the console.


optional defaultLocale?: Locale;

Defined in: types.ts:46

The default locale to use for all API requests.

Locale


optional logger?: { [key in LogLevels]?: LogMethod };

Defined in: types.ts:57

Represents a logger object with optional logging methods for various log levels.


optional serializer?: Serializer;

Defined in: types.ts:52

Custom serializer to use for deserializing api response.