UNPKG

sec-edgar-toolkit

Version:

Open source toolkit to facilitate working with the SEC EDGAR database

34 lines 917 B
/** * HTTP client for SEC EDGAR API with rate limiting and retry logic */ import { CacheOptions } from './cache'; export interface HttpClientOptions { rateLimitDelay?: number; maxRetries?: number; timeout?: number; cache?: CacheOptions | false; } export declare class HttpClient { private userAgent; private rateLimitDelay; private maxRetries; private timeout; private lastRequestTime; private cache?; constructor(userAgent: string, options?: HttpClientOptions); private sleep; private enforceRateLimit; private handleHttpError; get(url: string, options?: { skipCache?: boolean; }): Promise<any>; /** * Clear the cache */ clearCache(): Promise<void>; /** * Invalidate cache entries for a specific URL pattern */ invalidateCache(urlPattern: string): Promise<void>; } //# sourceMappingURL=http-client.d.ts.map