ts-api-core
Version:
Nodejs api framework core
28 lines (27 loc) • 1.23 kB
TypeScript
import { AxiosResponseType } from '../utils/access/http.access';
import { RequestContext } from '../context/request.context';
import { ApiBase, ApiCheckResult } from './api.base';
/**
* PC端接口访问基类
*/
export declare class ApiBasePc<CONTEXT extends RequestContext> extends ApiBase<CONTEXT> {
private readonly esn;
private readonly token;
constructor(context: CONTEXT, esn: string | undefined, token: string | undefined);
private _header;
/** 获取自定义头部信息 */
protected GetHeader(): any;
/**
* get请求
* @param actionPath 接口路径 斜杠开始
* @param params url参数 选填 支持Map对象/普通对象。
*/
protected Get(actionPath: string, params?: any | undefined, pick?: boolean, onCheckResult?: ApiCheckResult, respType?: AxiosResponseType): Promise<any>;
/**
* post请求
* @param actionPath 接口路径
* @param body body参数
* @param params url参数 选填 支持Map对象/普通对象。
*/
protected Post(actionPath: string, body?: any | undefined, params?: any | undefined, pick?: boolean, onCheckResult?: ApiCheckResult, respType?: AxiosResponseType): Promise<any>;
}