import { QueryParams, HTTPHeaders, HTTPMethod, Response, RequestConfig } from "./interfaces"; import { Json } from "../interfaces"; /** * Wrapper for the ajax request library (Currently Axios). * * Direct use of this class is not recommended. Use the APIServer or the * implementation of the Resource you need. */ export declare class Request { /** * The request url */ url: string; /** * The http method to use. */ method: HTTPMethod; /** * The request timeout in milliseconds. */ timeout: number; /** * Number of times to retry timed out requests. */ retries: number; /** * The http request header. */ headers?: HTTPHeaders; /** * The request data. */ data?: Json; /** * The url parameters to send with the request. */ queryParams?: QueryParams; /** * Used to count the number of times the request has been attempted. */ private attempts; constructor(method: HTTPMethod, url: string, timeout: number, { retries, headers, data, queryParams }?: RequestConfig); /** * Send the request to the server. * * @returns The response data from the server. */ send(): Promise; /** * Attempt to make the request. * * @returns The server response. */ private attemptRequest; /** * The request configuration object. * * @returns The configuration for the axios request. */ private get axiosConfig(); }