export interface HttpResponse<T = any> {
    data: T;
    status: number;
    headers: Headers;
}
export declare class HttpError extends Error {
    status: number;
    response: Response;
    constructor(status: number, response: Response, message: string);
}
declare function request<T = any>(url: string, options?: {
    method?: string;
    headers?: Record<string, string>;
    body?: any;
    responseType?: "json" | "arraybuffer" | "stream" | "text";
    params?: Record<string, any>;
    timeout?: number;
}): Promise<HttpResponse<T>>;
export declare const http: {
    get: <T = any>(url: string, options?: Omit<Parameters<typeof request>[1], "method">) => Promise<HttpResponse<T>>;
    post: <T = any>(url: string, body?: any, options?: Omit<Parameters<typeof request>[1], "method" | "body">) => Promise<HttpResponse<T>>;
    put: <T = any>(url: string, body?: any, options?: Omit<Parameters<typeof request>[1], "method" | "body">) => Promise<HttpResponse<T>>;
    patch: <T = any>(url: string, body?: any, options?: Omit<Parameters<typeof request>[1], "method" | "body">) => Promise<HttpResponse<T>>;
    delete: <T = any>(url: string, options?: Omit<Parameters<typeof request>[1], "method">) => Promise<HttpResponse<T>>;
    isHttpError: (e: any) => e is HttpError;
};
export default http;
