0.2.0 • Published 2 years ago
@zjxllib/http-request v0.2.0
依赖midway BFF 层 http请求的一个简单封装TS版
npm install @zjysc/http-request
..... import { ILogger } from '@midwayjs/logger'; import httpRequest from '@zjysc/http-request';
.....
@Inject()
logger: ILogger;
..... //获取所有数据 let response = await httpRequest(process.env.API_CMS_URL + this.URI_PATH, { level: type }, this.logger, { token: this.ctx.token }); .....