123456789101112131415161718192021222324252627282930313233343536 |
- import { Output } from './interface-v2';
- export declare class Base {
- protected userAgent: string;
- constructor();
- /**
- * get 请求参数处理
- * @param object query 请求参数
- * @param exclude 需要排除的字段
- * @returns
- */
- protected objectToQueryString(object: Record<string, any>, exclude?: string[]): string;
- /**
- * post 请求
- * @param url 请求接口
- * @param params 请求参数
- */
- protected postRequest(url: string, params: Record<string, any>, authorization: string): Promise<Record<string, any>>;
- /**
- * post 请求 V2
- * @param url 请求接口
- * @param params 请求参数
- */
- protected postRequestV2(url: string, params: Record<string, any>, authorization: string, headers?: {}): Promise<Output>;
- /**
- * get 请求
- * @param url 请求接口
- * @param query 请求参数
- */
- protected getRequest(url: string, authorization: string, query?: Record<string, any>): Promise<Record<string, any>>;
- /**
- * get 请求 v2
- * @param url 请求接口
- * @param query 请求参数
- */
- protected getRequestV2(url: string, authorization: string, query?: Record<string, any>): Promise<Output>;
- }
|