import { BodyInit, RequestInit } from 'node-fetch';
import { QueryType } from './query.js';
interface RequestOptions extends RequestInit {
    customOptions?: {
        /** 传入的数据格式是 formData 类型的 */
        formData?: boolean;
        /** 返回 blob 数据类型 */
        blob?: boolean;
        /** 返回 buffer 数据 */
        buffer?: boolean;
        /** body 类型 */
        body?: BodyInit | Record<string, any>;
        /** 是否为外部请求，若是，则只检查返回的 http code */
        isExternalReq?: boolean;
        /** 是否为 https 请求 */
        isHTTPs?: boolean;
    };
}
/**
 * 统一请求调用函数
 */
export declare const request: (url: string, options: RequestOptions) => Promise<any>;
/**
 * post 请求封装
 * @param url 请求链接
 * @param body 请求数据
 * @param opts 配置项
 */
export declare function post(url: string, body?: BodyInit | Record<string, any>, opts?: RequestOptions): Promise<any>;
/**
 * get 请求封装
 * @param url 请求链接
 * @param {QueryType} query 请求 query 参数
 * @param opts 配置项
 */
export declare function get(url: string, query?: QueryType, opts?: RequestOptions): Promise<any>;
export {};
