///
///
type DownloadFileHandler = (file: string) => Promise;
export interface Fetcher {
downloadFile(url: string, maxLength: number, handler: DownloadFileHandler): Promise;
downloadBytes(url: string, maxLength: number): Promise;
}
export declare abstract class BaseFetcher implements Fetcher {
abstract fetch(url: string): Promise;
downloadFile(url: string, maxLength: number, handler: DownloadFileHandler): Promise;
downloadBytes(url: string, maxLength: number): Promise;
}
interface FetcherOptions {
timeout?: number;
retries?: number;
}
export declare class DefaultFetcher extends BaseFetcher {
private timeout?;
private retries?;
constructor(options?: FetcherOptions);
fetch(url: string): Promise;
}
export {};