UNPKG

api-wizard

Version:

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

19 lines (18 loc) 648 B
import { FetchClientImpl } from './fetchClient'; import { FetchResponse, FetchRequestConfig } from './interface/Http'; import { Interceptor } from './interface/Property'; export declare class InterceptedFetchClient extends FetchClientImpl { private interceptor?; constructor(config?: { baseURL?: string; headers?: HeadersInit; requestConfig?: RequestInit; interceptor?: Interceptor; }); private handleRequestInterceptor; private handleResponseInterceptor; private handleErrorInterceptor; request<T>(config: FetchRequestConfig & { url: string; }): Promise<FetchResponse<T>>; }