UNPKG

axios-smart-client

Version:

A smart Axios wrapper with multi-baseURL support, token injection, retry logic, and simplified API usage.

16 lines (14 loc) 343 B
export interface InitConfig { baseURLs: Record<string, string>; retries?: number; showLoading?: boolean; getToken?: () => string | null; onError?: (err: any) => void; } export function init(config: InitConfig): void; export function api( base: string, method: string, url: string, data?: any ): Promise<any>;