UNPKG

@trlogic/tracker-web

Version:
18 lines (17 loc) 588 B
export interface HttpRequestConfig { headers?: Record<string, string>; timeout?: number; } export declare class HttpError extends Error { readonly status: number; constructor(message: string, status: number); } /** * Fetch API wrapper with timeout, JSON serialization, and error handling. * Mirrors Android DefaultNetworkService HTTP layer. */ export declare class HttpClient { static get<T>(url: string, config?: HttpRequestConfig): Promise<T>; static post<T>(url: string, body?: unknown, config?: HttpRequestConfig): Promise<T>; private static request; }