UNPKG

api-wizard

Version:

A powerful TypeScript wrapper for native Fetch API with token management, interceptors, and type-safe HTTP requests

20 lines (19 loc) 714 B
import { FetchClientImpl } from './fetchClient.js'; import { FetchResponse, FetchRequestConfig } from './interfaces/Fetch.js'; import { Interceptor } from './interfaces/Property.js'; export declare class InterceptedFetchClient extends FetchClientImpl { private interceptor?; constructor(config?: { baseURL?: string; headers?: HeadersInit; requestConfig?: RequestInit; interceptor?: Interceptor; validateStatus?: (status: number) => boolean; }); private handleRequestInterceptor; private handleResponseInterceptor; private handleErrorInterceptor; request<T>(config: FetchRequestConfig & { url: string; }): Promise<FetchResponse<T>>; }