import { RequestLogEntry, TargomoClient } from '../api/index'; import { TargomoEnvironment } from '../constants'; import { Cache } from '../util/cache'; export declare class RequestsUtil { private options?; constructor(options?: { debug?: boolean; timeout?: number; environment?: TargomoEnvironment; requestLogger?: (payload: RequestLogEntry) => void | Promise; }); fetch(url: string, method?: string, payload?: any, headers?: { [index: string]: string; }): Promise; fetchData(url: string, method?: string, payload?: any, headers?: { [index: string]: string; }): Promise; /** * * @param cache * @param url * @param method * @param payload */ fetchCached(cache: boolean | Cache, url: string, method?: string, payload?: any, headers?: { [index: string]: string; }): Promise; /** * * @param cache * @param url * @param method * @param payload */ fetchCachedData(cache: boolean | Cache, url: string, method?: string, payload?: any, headers?: { [index: string]: string; }): Promise; } export declare function requests(client?: TargomoClient, _options?: { requestTimeout?: number; }): RequestsUtil;