import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { FinalParameters, SpiderSiteConfig, SpiderTask } from './spider'; export declare class RecoverableFetchError extends Error { constructor(m: string); } export declare class SkippableFetchError extends Error { constructor(m: string); } export interface RetryOpts { maxRetries?: number; requestTimeout?: number; recoverableHttpStatus?: number[]; skippableHttpStatus?: number[]; retryDelay?: number; } export declare type RetryOptsFinal = FinalParameters; declare type OmittedAxiosRequestConfig = Omit; export interface AxiosRequestConfigExtended extends OmittedAxiosRequestConfig { url: string | string[]; } export declare class HttpFetch { protected spider: SpiderTask; static readonly recoverableHttpStatuses: number[]; static readonly skippableHttpStatuses: number[]; constructor(spider: SpiderTask); protected isRecoverableError(err: any, retryOpts: RetryOptsFinal): boolean; protected isSkippableError(err: any, retryOpts: RetryOptsFinal): boolean; protected attemptFetch(requestOpts: AxiosRequestConfig, retryOpts: RetryOptsFinal): Promise>; fetch(requestOpts: AxiosRequestConfigExtended, retryOpts: RetryOpts): Promise>; static determineRetryOpts(siteConfig: SpiderSiteConfig): RetryOpts; } export {}; //# sourceMappingURL=http-fetch.d.ts.map