import { ErrorResponse, FetchCallbacks, FetchRequest } from "./interfaces"; export default class Fetcher implements FetchCallbacks { onResponse?: (response: Response) => void; onError?: (error: ErrorResponse) => void; onData?: (data: Record) => void; constructor(callbacks: FetchCallbacks); fetch(request: FetchRequest): Promise<{ headers: Headers; payload: any; }>; /** * Replaces any template in the URL with the parameters of the request * @param request */ buildUrl(request: FetchRequest): string; /** * Builds the headers to be sent from the key-value pair headers of the configuration * @param request */ buildHeaders(request: FetchRequest): Promise; buildBody(request: FetchRequest): FormData | undefined; processResponse(response: Response): Promise<{ headers: Headers; payload: any; }>; /** * Converts the content to an object if possible according to the content type returned from the server */ parseContent(response: Response): Promise; handleError(error: ErrorResponse): void; } //# sourceMappingURL=Fetcher.d.ts.map