Kind: Function
Source: atloria-monorepo/apps/web/src/lib/api-client.ts
Create an API client for the Atloria application
This client makes HTTP requests to the backend API
Signature
tsfunction createAPIClient(config: {
apiUrl: string;
getToken?: () => string | null;
/** True while NextAuth is still resolving the session — the fetcher waits instead of firing unauthenticated. */
isSessionLoading?: () => boolean;
}): APIClient
Parameters
| Name | Type |
|---|---|
config | `{ |
| apiUrl: string; | |
| getToken?: () => string | null; |
| /** True while NextAuth is still resolving the session — the fetcher waits instead of firing unauthenticated. */ | |
| isSessionLoading?: () => boolean; | |
| }` |
Returns: APIClient
Was this page helpful?