import { Json } from "../interfaces";
import { HTTPHeaders, HTTPMethod, QueryParams, RequestConfig, Response } 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 | File | FormData;
    /**
     * The url parameters to send with the request.
     */
    queryParams?: QueryParams;
    /**
     * Used to count the number of times the request has been attempted.
     */
    private attempts;
    /**
     * Used to cancel an api request
     */
    private cancelToken?;
    constructor(method: HTTPMethod, url: string, timeout: number, { retries, headers, data, queryParams, cancelToken }?: RequestConfig);
    /**
     * Send the request to the server.
     *
     * @returns The response data from the server.
     */
    send(): Promise<Response>;
    /**
     * 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();
}
