UNPKG

fetchero

Version:

_A type-safe, proxy-based HTTP & GraphQL client for modern applications._

20 lines (19 loc) 708 B
import { AxiosRequestConfig } from 'axios'; import { FetcherResponse, FetcheroOptions } from '../types'; /** * Core HTTP client functionality */ export declare class HttpClient { private readonly baseUrl; private readonly headers; private readonly interceptors?; constructor(baseUrl: string, headers: Record<string, string>, interceptors?: FetcheroOptions['interceptors']); /** * Enhanced HTTP request handler with better error handling and performance */ makeRequest<T = unknown>(config: AxiosRequestConfig): Promise<FetcherResponse<T>>; /** * Enhanced error handling with better error categorization */ private handleRequestError; }