
[英]how to get nested api data using nestjs httpservice (axios)
[英]How to get a stream from HttpService in NestJS
我正在创建一个 NestJS 应用程序,我需要将 stream 作为参数传递给一些 function。 我想用nest的HttpService来给我这个stream。
我正在尝试使用名为responseType
的 Axios 参数
但是这段代码似乎只返回字符串而不是我想要的 stream
const { data } = await this.httpService.get(url, {
responseType: 'stream'
}).toPromise();
如何让 Nest 的 HttpService 返回 stream?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.