腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
无法使用
nest
.js
HttpService
发出成功的请求
axios
、
nestjs
我试图使用他们的文档中指定的
nest
.js
HttpService
发出请求,但是我一直收到一个我无法理解的错误。:import { Controller, Get } from '@nestjs/common'; ) {} async getHello(): Promise<string> {
浏览 39
提问于2022-03-22
得票数 0
回答已采纳
1
回答
在nestjs/ axios中设置全局(模块级)拦截器
node.js
、
typescript
、
axios
、
nestjs
我知道我可以将它添加到
HttpService
的每个实例,如下所示: this.
httpService
.axiosRef.interceptors.request.use((config) => ...)
浏览 76
提问于2022-05-17
得票数 0
1
回答
我无法从Nestjs中的json文件中获取数据。
json
、
axios
、
nestjs
我所犯的错误是import { Injectable } from '@nestjs/common'export class ResourcesService { @InjectModel('Resources') ) {
浏览 5
提问于2022-06-13
得票数 0
1
回答
尝试在OnModuleInit中执行Axios调用
nestjs
@Injectable() constructor(private
httpService
:
HttpService
) {} console.log(this.
httpService
.get('https://api.github.com
浏览 11
提问于2022-06-23
得票数 0
回答已采纳
1
回答
使用axios抛出错误对拦截器进行单元测试
javascript
、
node.js
、
typescript
、
jestjs
、
nestjs
我正在为我的Nestapp编写单元测试。对于拦截器文件,我正在编写一个测试用例,以便在执行error.message.indexOf('timeout') >= 0并使用错误消息调用Axios.Cancel时抛出错误。 但是在我的规范文件中,我得到了:Cannot read property 'intercept' of undefined,PFB,我的代码,我在这里遗漏了什么? 如果需要,可以提供任何模拟! timeout.interceptor.ts import { NestInterceptor,
浏览 47
提问于2019-04-24
得票数 1
1
回答
在Nestjs中发送带有头的Post请求
node.js
、
typescript
、
express
、
request
、
nestjs
我想使用axio的
HttpService
。
浏览 23
提问于2022-01-27
得票数 0
1
回答
在
Nest
中发出http请求时
httpService
未定义的错误
typescript
、
axios
、
nestjs
我试图在我的
Nest
JS应用程序中进行第三方API调用。由于
Nest
JS在其文档中使用了Axios,并且在其文档中有一个专用页面,所以我确保按照文档提供的实现来执行,但是当我试图从Nestjs通过
httpService
未定义的错误通过httpModule发出请求时bankVerification.service.tsimport { Observable } from:
HttpServi
浏览 2
提问于2020-06-23
得票数 0
回答已采纳
3
回答
Nestjs使用axios
javascript
、
node.js
、
axios
、
nestjs
这个简单的演示有一个错误 import { AxiosResponse }Observable } from 'rxjs'export class AppController { constructor(private readonly http:
HttpService
[
Nest
] 7356 - 2018-10-18 00:0
浏览 868
提问于2018-10-18
得票数 21
回答已采纳
1
回答
@Interval中的nestJs
httpService
.get请求没有反应。
javascript
、
typescript
、
axios
、
nestjs
、
httpservice
我有一个注入
HttpService
并使用@Interval(20000)启动请求的服务。在interval函数中,我使用this.http.get(.)向另一个服务器发出请求。:export class AppService{ @I
浏览 5
提问于2020-11-10
得票数 0
回答已采纳
1
回答
在Nestjs中从可观察对象内的响应返回数据
typescript
、
observable
、
nestjs
我使用的是
Nest
内置的HttpModule,它包装了Axios,然后使用
HttpService
向Open weather发出GET请求。请求返回的是一个可观察对象,这对我来说是全新的。如何从Injectable service中的可观察对象中提取实际响应数据并将其返回给Controller 这是我的weather.service.ts import { Injectable,
HttpService
} from '@nestjs/common'; export class App
浏览 36
提问于2020-12-11
得票数 1
回答已采纳
1
回答
如何在
Nest
.js中间件中使用服务
nestjs
我需要在一些中间件中使用来自@nestjs/axios的
HttpService
来验证验证码响应。controllers: [AppController],}):
HttpService
/
浏览 68
提问于2021-09-20
得票数 0
回答已采纳
1
回答
如何在
nest
HttpService
上用jest测试
HttpService
unit-testing
、
axios
、
jestjs
、
nestjs
在我的NestJS项目中有以下方法: return this.
httpService
.post(`${url}/oauth2status: 200, headers: {}, }; .spyOn(
httpService
config: {} isAxiosError: true
浏览 5
提问于2021-06-03
得票数 0
回答已采纳
1
回答
Socket.IO NestJS无法连接:保持断开连接/重新连接
typescript
、
sockets
、
websocket
、
socket.io
、
nestjs
请看以下内容: [
Nest
] 12232 - 01/06/2021, 11:28:24 AM [NotificationGateway] Client connected: a2f47PSPB9oUn74AACr[
Nest
] 12232 - 01/06/2021, 11:28:30 AM [NotificationGateway] Client connected: NPBzcFBJLHAkQmcAACsNotificationService)) private readonly notific
浏览 45
提问于2021-01-06
得票数 0
回答已采纳
1
回答
Nest
.js RangeError:已超过最大调用堆栈大小
typescript
、
axios
、
nestjs
this.getResponse(); export class CollectService { asyn
浏览 65
提问于2021-02-28
得票数 0
回答已采纳
2
回答
如何在NestJS中记录所有Axios外部http请求
javascript
、
node.js
、
typescript
、
axios
、
nestjs
我希望能够用完整的url、头等记录每个axios请求,但目前还没有找到这样做的方法。export class HttpLoggerInterceptor implements NestInterceptor { context: ExecutionContext, ): Observable<any> { map(data => { //
浏览 2
提问于2019-01-17
得票数 4
回答已采纳
1
回答
Nestjs启动时出现AXIOS_INSTANCE_TOKEN错误
node.js
、
axios
、
nestjs
这就是我所拥有的: 错误: ] [
Nest
] 94322 - 02/04/2021, 12:16:31 PM [Genysis Gateway] Start Gateway[0] [
Nest
] 94322 -02/04/2021, 12:16:32 PM [Instanc
浏览 145
提问于2021-02-05
得票数 0
2
回答
用于在nestjs中测试的redis mock
unit-testing
、
redis
、
nestjs
、
redisclient
import { RedisService } from 'nestjs-redis';import {
HttpService
await Test.createTestingModule({ }
浏览 35
提问于2020-06-29
得票数 0
1
回答
Nest
.js处理
HttpService
错误
rxjs
、
axios
、
nestjs
我正在尝试测试在
HttpService
中构建的NestJS(它基于Axios)。不过,我在测试错误/异常状态时遇到了问题。provide: ConfigService, }, provide:
HttpService
headers: { } co
浏览 1
提问于2020-05-12
得票数 3
回答已采纳
1
回答
NestJ:如何上传文件异步
httpService
file-upload
、
nestjs
、
multer
我已经创建了一个api来上传,然后使用
HttpService
,但它似乎不起作用。
浏览 6
提问于2022-01-07
得票数 0
2
回答
如何使用NestJS从第三方接口获取数据
axios
、
nestjs
当我搭建这个应用程序时,我使用了
nest
new weather-app,并按顺序生成了一个天气模块、服务和控制器,以确保一切都与
nest
g <<<type of file>>> weather正确集成:
HttpService
) {} return this.
httpService
.get我有一个更大的项目,我想在其中使用
浏览 140
提问于2020-04-27
得票数 0
点击加载更多
相关
资讯
预言机协议NEST计划推出算法Stablecoin发行平台NEST ABC
怎么看Nest项目?
Nest Designs天猫直播开启全新“野心时刻”
Nest Mini音箱蓄势待发,谷歌能否赶超亚马逊?
谷歌发布Nest mini音箱:音质增强 售价49美元
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
语音识别
活动推荐
运营活动
广告
关闭
领券