import { CdmCorpusContext } from '../../Cdm/CdmCorpusContext';
import { StorageAdapterConfigCallback } from '../../Storage/StorageAdapterConfigCallback';
import { CdmHttpRequest } from './CdmHttpRequest';
import { CdmHttpResponse } from './CdmHttpResponse';
import { HttpRequestCallback } from './HttpRequestCallback';
/**
 * CDM Http Client is an HTTP client which implements retry logic to execute retries in the case of failed requests.
 * A user can specify API endpoint when creating the client and additional path in the CDM HTTP request.
 * Alternatively, if a user doesn't specify API endpoint in the client, it has to specify the full path in the request.
 * The client also expects a user to specify callback function which will be used in the case of a failure
 * (4xx or 5xx HTTP standard status codes).
 */
export declare class CdmHttpClient {
    private TAG;
    /**
     * @internal
     */
    headers: Map<string, string>;
    private apiEndpoint;
    private httpHandler;
    /**
     * Initializes a new instance of the CdmHttpClient.
     * @param {string} apiEndpoint The API endpoint
     * @param {HttpRequestCallback} httpHandler The HTTP handler which implements the interface to support injection of
     * different system's http request methods.
     */
    constructor(apiEndpoint?: string, httpHandler?: HttpRequestCallback);
    /**
     * Executes a promise that will wait for some specified amount of time by using timeout.
     * @param {number} ms The wait time in milliseconds.
     * @return {Promise}
     */
    static sleep(ms: number): Promise<void>;
    /**
     * Combine the base URL with the URL's suffix.
     * @param {string} baseUrl The base URL.
     * @param {string} suffix The suffix.
     * @return {string} representing the concatenated URL.
     */
    private static Combine;
    /**
     * @internal
     * Sends a CDM request with the retry logic.
     * @param {CdmHttpRequest} cdmRequest The CDM Http request.
     * @param {StorageAdapterConfigCallback} callback An optional parameter which specifies a callback function that gets
     * executed after we try to execute the HTTP request.
     * @return {Promise}, representing the CDM HTTP response.
     */
    SendAsync(cdmRequest: CdmHttpRequest, callback?: StorageAdapterConfigCallback, ctx?: CdmCorpusContext): Promise<CdmHttpResponse>;
    /**
     * Sends a CDM request with the retry logic helper function.
     * @param {CdmHttpRequest} cdmRequest The CDM Http request.
     * @param {StorageAdapterConfigCallbackequest} callback An optional parameter which specifies the adapter which
     * contains the callback function that gets executed after we try to execute the HTTP request.
     * @return {Promise}, representing the CDM HTTP response.
     */
    private SendAsyncHelper;
}
