UNPKG

@crowdin/crowdin-api-client

Version:
38 lines (37 loc) 1.1 kB
/// <reference lib="dom" /> /** * Import DOM types for this module _just_ to expose adequate types for * fetch interfaces */ import { HttpClient } from '../..'; /** * @internal */ export declare class FetchClient implements HttpClient { private maxConcurrentRequests; private requestIntervalMs; private pendingRequests; private timeout; withTimeout(timeout?: number): this; get<T>(url: string, config?: { headers: Record<string, string>; }): Promise<T>; delete<T>(url: string, config?: { headers: Record<string, string>; }): Promise<T>; head<T>(url: string, config?: { headers: Record<string, string>; }): Promise<T>; post<T>(url: string, data?: unknown, config?: { headers: Record<string, string>; }): Promise<T>; put<T>(url: string, data?: unknown, config?: { headers: Record<string, string>; }): Promise<T>; patch<T>(url: string, data?: unknown, config?: { headers: Record<string, string>; }): Promise<T>; private request; private isBuffer; private waitInQueue; }