import { AxiosError, CancelTokenSource, AxiosInstance } from 'axios'; import { IHttpServiceSettings } from '../types'; export declare class HttpService { private readonly _httpClient; private _pendingRequests; private _isOffline; private readonly _settings; private _requestProgress; constructor(settings?: IHttpServiceSettings); get client(): AxiosInstance; get pendingRequests(): number; get isOffline(): boolean; get requestProgress(): { event: ProgressEvent; value: number; }; createCancelToken(): CancelTokenSource; /** * Converts request body into FormData if any file detected. * * @param data - Request body. */ protected convertDataIntoFormData(data: any): any; /** * Defines whether there any files in provided body. * * @param body - Data structure to check. * @param [removeFromBody] - Whether to remove found files from initial body. */ protected getFiles(body: GenericObject, removeFromBody?: boolean): GenericObject; protected setupHttpClientInterceptors({ httpClient, requestTimeout, shouldCatchErrors, debug, queryStringifyOptions, withCredentials, }: IHttpServiceSettings): void; protected setRequestProgress(event: ProgressEvent): void; protected increasePendingRequestsCounter(): void; protected decreasePendingRequestsCounter(): void; protected checkIfOffline(): void; protected logError(err: AxiosError, isCancel?: boolean): void; protected catchError(err: AxiosError, isCancel?: boolean): IHttpError & { errors?: IValidationError[]; }; } export declare const httpService: HttpService;