snowcell
Version:
Official Snowcell Node.js/TypeScript SDK
13 lines • 577 B
TypeScript
export type HttpMethod = 'HEAD' | 'GET' | 'PUT' | 'DELETE' | 'OPTIONS' | 'TRACE' | 'POST' | 'PATCH';
export interface RetryOptions {
maxAttempts?: number;
backoffFactor?: number;
jitterRatio?: number;
maxBackoffWait?: number;
}
export declare function calculateBackoff(attempt: number, opts?: RetryOptions): number;
export declare function fetchWithRetries(input: RequestInfo | URL, init?: RequestInit & {
retry?: RetryOptions;
}): Promise<Response>;
export declare function iterSSE(res: Response): AsyncGenerator<string>;
//# sourceMappingURL=util.d.ts.map