/** * Fetch utilities with retries, timeouts, and keep-alive. * * @module fetch-utils */ export interface FetchOptions { /** Request timeout in milliseconds. */ timeoutMs?: number; /** Maximum number of retries. */ maxRetries?: number; /** Delay between retries in milliseconds. */ retryDelayMs?: number; /** Custom headers. */ headers?: Record; /** HTTP method. */ method?: "GET" | "POST" | "HEAD"; /** Request body for POST. */ body?: string; /** Use cache. */ useCache?: boolean; /** Cache TTL in milliseconds. */ cacheTtlMs?: number; /** Abort signal. */ signal?: AbortSignal; } export interface FetchResult { /** Response body as text. */ text: string; /** HTTP status code. */ status: number; /** Response headers. */ headers: Headers; /** Final URL after redirects. */ url: string; } export declare class FetchError extends Error { readonly status?: number | undefined; readonly url?: string | undefined; constructor(message: string, status?: number | undefined, url?: string | undefined); } /** * Fetch a URL with retries, timeout, and caching. */ export declare function fetchWithRetry(url: string, options?: FetchOptions): Promise; /** * Check if a URL is reachable. */ export declare function isReachable(url: string, timeoutMs?: number): Promise; //# sourceMappingURL=fetch-utils.d.ts.map