import { AxiosInstance, AxiosRequestConfig, CancelTokenSource, CancelTokenStatic, Method } from 'axios';
export interface IResponse<T = any> {
    data: T;
    status: number;
    statusText: string;
    headers: any;
    config: AxiosRequestConfig;
    request?: any;
}
export interface IRequester {
    get: <T>(path: string, options?: AxiosRequestConfig) => Promise<IResponse<T>>;
    put: <T>(path: string, payload: any, options?: AxiosRequestConfig) => Promise<IResponse<T>>;
    delete: <T>(path: string, options?: AxiosRequestConfig) => Promise<IResponse<T>>;
    post: <T>(path: string, payload: any, options?: AxiosRequestConfig) => Promise<IResponse<T>>;
    create: <T>(method: Method, path: string, payload: any, options?: AxiosRequestConfig) => Promise<IResponse<T>>;
}
export declare class Requester {
    cancelToken: CancelTokenStatic;
    source: CancelTokenSource;
    isCancel: (value: any) => boolean;
    service: AxiosInstance;
    private readonly options;
    constructor(options?: AxiosRequestConfig);
    get<T>(path: string, options?: AxiosRequestConfig): Promise<IResponse<T>>;
    put<T>(path: string, payload: any, options?: AxiosRequestConfig): Promise<IResponse<T>>;
    delete<T>(path: string, options?: AxiosRequestConfig): Promise<IResponse<T>>;
    post<T>(path: string, payload: any, options?: AxiosRequestConfig): Promise<IResponse<T>>;
    create<T>(method: Method, path: string, payload: any, options?: AxiosRequestConfig): Promise<IResponse<T>>;
}
export declare const NewRequester: IRequester;
