腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
Angular
HttpInterceptor
不
工作
、
我想实现一个
HttpInterceptor
,但不知何故,它什么也做不了。实现
HttpInterceptor
的自定义服务import {HttpEvent,
HttpInterceptor
,HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse} from '@
angular
/common/http
浏览 5
提问于2017-08-09
得票数 0
回答已采纳
1
回答
角HttpClient TypeError:物体(.)不是一个函数
、
、
、
我的nebular面板版本5.0.0使用了角9,并且
工作
得很好,我升级到了6.0.0版本,它使用了角10 (通过升级package.json中的版本),现在在dev服务器上,一切都
工作
得很好,但是在部署到生产服务器console.log('done get:' + url); }在intercept, throwError(error)中引起的错误见下文
httpinterceptor
.tsimport {Injectable} from '@
a
浏览 6
提问于2020-12-11
得票数 1
回答已采纳
1
回答
NativeScript中的
httpinterceptor
无法正常
工作
、
、
我正在使用
httpinterceptor
拦截带有JWT令牌的http头,但不起作用。 下面是我的GET方法。在请求中手动添加报头是可行的,但使用
httpinterceptor
。} headers: { Authorization:持有者${tokenInfo}, "Content-Type": "application/json" }, -->如果我添加这一行,它可以很好地
工作
,
HttpInterceptor
} from '@
angular</e
浏览 9
提问于2019-05-12
得票数 0
回答已采纳
1
回答
Angular
4阻断器变化响应
、
、
我有一个特别的
HttpInterceptor
HttpRequest} from '@
angular
/common/http';import {Observable} from 'rxjs/Obser
浏览 6
提问于2017-09-20
得票数 5
回答已采纳
1
回答
Angular
Http full response using HttpClient with HttpClient
、
、
我在
Angular
4中使用了很多http请求。 现在,我将升级到
Angular
6,并使用HttpClient进行完全响应。我将尝试在
HttpInterceptor
中执行{observe: 'response'}参数 我的代码如下 import { Injectable } from '@
angular
/core'; HttpRequest, HttpEvent,
浏览 8
提问于2019-02-19
得票数 0
1
回答
Django角403 Django不接受CSRF-cookie:"CSRF令牌丢失或不正确。“
、
、
、
、
我正在尝试使用
Angular
6和Django相结合来创建SPA。如果Django不接受我在请求中发送的csrftoken cookie,我会有问题。以下是cookie策略的角度设置方式:import { FormsModule,ReactiveFormsModule } from '@
angular
/forms'; import { NgModule } from
浏览 0
提问于2018-05-26
得票数 2
回答已采纳
2
回答
角度6-对飞行前请求的响应不通过访问控制检查:没有“访问-控制-允许-来源”报头
、
、
、
当将POST请求从角发送到Core API时, ( 1)如果将数据作为FormData从传递给Core,那么它
工作
得很好。
浏览 0
提问于2018-08-27
得票数 3
1
回答
在
HttpInterceptor
-
Angular
2中使用服务
、
、
显然,这是因为构造函数不能与扩展类不同: 在我的InterceptedHttp类中仍然可以使用该服务吗?
浏览 1
提问于2017-08-15
得票数 1
1
回答
角11你提供了“未定义的”,在那里流是预期的。
、
、
、
我不会得到错误信息和错误代码时,从服务器端的角度。我使用的是角11,在下面的代码中得到了错误 let headers = new HttpHeaders(); 'Authorization', ); headers
浏览 6
提问于2021-12-14
得票数 0
1
回答
基本
HttpInterceptor
从未达到
、
我想实现一个
HttpInterceptor
,以便处理一个404错误。现在,当到达
HttpInterceptor
时,我只想在控制台中记录一些内容。我实现了一个基本的doNothing
HttpInterceptor
,但是没有
工作
。app.module.tsimport { ErrorHandlerIntercepto
浏览 1
提问于2019-01-21
得票数 2
回答已采纳
1
回答
为什么req.logIn ()在使用
angular
时不存储数据?
、
我正在开发
angular
和nodejs及其库、passport、passport-local、express、express-session。req.logIn ()没有将数据保存到会话中,我用postman尝试了rest api,它
工作
正常,并且它保存了数据,这是怎么回事?有没有人帮个忙,请提前谢谢你?
浏览 9
提问于2021-01-26
得票数 0
回答已采纳
2
回答
在角4中全局捕获请求,如果没有internet,则停止
、
、
我可以使用window.navigator.onLine和使用下面提到的
HttpInterceptor
获得连接状态,我可以访问全局请求。但是如何取消
HttpInterceptor
中的请求呢?import { Injectable } from '@
angular
/core'; HttpRequest, HttpEvent,
HttpInterceptor
} from '@
angular
/c
浏览 4
提问于2017-10-18
得票数 7
回答已采纳
1
回答
“
HttpInterceptor
”仅指类型,但此处用作值
、
、
我将我的新VS2017
angular
项目从原来的4.2.5升级到v4.4.6,然后尝试在我的app.module.shared.ts文件中设置一个
HttpInterceptor
,如下所示:import { CommonModule } from '@
angular
/common'; import { FormsModule,
HttpInterceptor
}
浏览 0
提问于2017-10-19
得票数 1
2
回答
ANGULAR
5:如何使用httpClient拦截器
、
在这个小示例中,我想了解如何使用
Angular
5实现httpClient拦截器import {HttpClient, HttpHeaders} from '@
angular
/common/http'; logintest(): Observable<any>{ var body = {
浏览 0
提问于2018-05-11
得票数 0
1
回答
从spring表单登录返回的
Angular
5 - Set cookie
、
、
、
我正在尝试将spring安全性添加到使用
angular
5和spring 1.5.8构建的应用程序中。我试图添加的身份验证机制是spring的formLogin。+"/login" , body.toString() , httpOptions) //How to make
angular
浏览 0
提问于2018-06-21
得票数 6
回答已采纳
2
回答
HttpInterceptor
不
拦截
Angular
10中的请求
、
、
我有一个
HttpInterceptor
,用于将本地存储中的JWT令牌添加到我的http请求的头部。我相信我所有的http请求都是在没有任何报头的情况下发送的,但我不明白为什么它不能
工作
。我的拦截器: import { Injectable, Injector } from '@
angular
/core'; @Injectable
浏览 54
提问于2020-10-27
得票数 1
1
回答
使用
Angular
Service Worker发送JWT令牌
、
、
、
、
对于我正在开发的
Angular
7应用程序,我使用
HttpInterceptor
在每次请求时发送令牌。它看起来像这样: export class JwtInterceptor implements
HttpInterceptor
{ intercept(request: HttpRequest<any>/service-worker和@
angular
/pwa。我想,配置并不难,所以它看起来应该可以
工作
。但问题是,我找不到一种方法来增强这个worker,使其总是在每次请求时都
浏览 17
提问于2019-03-18
得票数 2
1
回答
如何从
angular
中的
httpInterceptor
错误处理服务中获取组件名称?
、
我需要获取
angular
ts文件中发生错误的确切组件名称、函数名称和行号,但我无法从
httpInterceptor
中获取它们。请帮助我从
httpInterceptor
获取以上内容。console.log(this.route.routeConfig.component.name); 我尝试过上面的方法,它给出了当前
工作
组件的组件名称,但我必须从
httpInterceptor
中获取组件名称import { Injectable, ErrorHandler, Input } from '@
浏览 13
提问于2019-06-27
得票数 0
回答已采纳
1
回答
角2 RC-5异步测试
不
工作
。
、
这就是密码: async, TestBedimport { Response, RequestOptions, ConnectionBackendimport {MockBackend, MockConnection} f
浏览 2
提问于2016-08-22
得票数 1
回答已采纳
4
回答
角5+:如何延迟/所有HttpClient请求?
、
我有这样的代码:this.http.get<IUser[]>(Urls.users()) response => { this.root.next({'users': this._values}); e =>
浏览 0
提问于2018-04-30
得票数 23
回答已采纳
点击加载更多
相关
资讯
当本场VOR/DME不工作以后
关于setInterval切换页面时不工作
不达目的不罢休,全球首次发现 OpenAI 模型工作时会破坏关机命令
RSCONN01发送邮件不工作
为何机器人抢不走你的工作
热门
标签
更多标签
云服务器
ICP备案
实时音视频
即时通信 IM
对象存储
活动推荐
运营活动
广告
关闭
领券