/**
 * XMLHttpRequest configuration having the following parameters
 * url: the path to the request, mandatory
 * method: possible http methods: GET, POST, PUT, PATCH, DELETE, etc
 * responseType: arraybuffer, blob, document, json, text or empty string
 * headers: object containing headers as name: value pairs
 * body: request body
 * withCredentials: True when credentials are to be included in a cross-origin request. False otherwise.
 * timeout - time in milliseconds. A non-zero value will terminate the execution after the given time has passed
 */
export interface XHRConfig {
    url: string;
    method?: string;
    responseType?: XMLHttpRequestResponseType;
    headers?: {
        [key: string]: string;
    };
    body?: Document | XMLHttpRequestBodyInit;
    withCredentials?: boolean;
    timeout?: number;
}
/**
 * Default xhr configuration
 */
export declare const DEFAULT_XHR_CONFIG: XHRConfig;
/**
 * Utility function to call a XMLHttpRequest and send the response as a Promise. The response can be parameterized
 *
 * @param config xhr configuration
 */
export declare function xhr<T>(urlOrConfig: string | XHRConfig): Promise<T>;
//# sourceMappingURL=xhr.d.ts.map