voca-http
Version:
A lightweight and flexible HTTP client for the browser and node.js
9 lines (8 loc) • 465 B
TypeScript
import { VocaConfig } from '../types';
/**
* Creates a base HTTP client with interceptors and configuration
* @param fetch Native fetch function to use
* @param config Configuration options
* @returns Configured fetch function
*/
export declare const vocaCreate: (fetch: typeof globalThis.fetch, { baseUrl, onError, onRequest, onRequestError, onResponse, onResponseError, interceptors, retryCount, timeout, }?: VocaConfig) => (...args: any[]) => Promise<any>;