import { AxiosRequestConfig, AxiosResponse, Method } from 'axios';
import { ContentType, MsHttpClient } from './MsHttpClient';
import { GlobalSettings } from './GlobalSettings';
export interface MsAxiosRequestConfig extends AxiosRequestConfig {
    action?: string;
    inParams?: object;
}
export interface MsAxiosResponse extends AxiosResponse {
    config: MsAxiosRequestConfig;
}
export declare class DefaultClient implements MsHttpClient {
    private _axios;
    private _globalSettings?;
    constructor(baseURL: string, responseTimeoutMs?: number);
    /**
     * 创建默认基于Axios 实现的微服务请求客户端
     * @param globalSettings
     */
    static create(globalSettings: GlobalSettings): DefaultClient;
    private static getCookie;
    /**
     * 设置axios Request拦截器
     *
     * @param onFulfilled
     * @param onRejected
     */
    setRequestInterceptors(onFulfilled: (value: MsAxiosRequestConfig) => Promise<MsAxiosRequestConfig>, onRejected?: (error: any) => any): void;
    /**
     * 设置axios Response拦截器
     *
     * @param onFulfilled
     * @param onRejected
     */
    setResponseInterceptors(onFulfilled: (value: MsAxiosResponse) => Promise<MsAxiosResponse>, onRejected?: (error: any) => any): void;
    /**
     * 微服务请求
     *
     * @param method
     * @param contentType
     * @param headers
     * @param parameters
     */
    request(method: Method, contentType: ContentType, headers: object, parameters: any): Promise<any>;
    /**
     * ajax 请求
     *
     * @param method
     * @param contentType
     * @param headers
     * @param parameters
     */
    private _request;
    /**
     * 文件上传
     */
    private _upload;
    private _isUploadFileRequest;
    private _parseHeaders;
}
