angular - Angular HttpInterceptor 是如何被调用的?
问题描述
我试图在这里理解一些代码:
我试图了解它如何使缓存无效:
// Stop using the cache if there is a mutating call.
if (req.method !== 'GET' && req.method !== 'HEAD') {
this.isCacheActive = false;
this.invalidateCacheEntry(req.url);
}
当 req.method !== 'GET' 时,你如何得到一个情况?我只使用 GET 请求。
解决方案
推荐阅读
- javascript - jQuery错误无法读取未定义的属性“提交”
- java - 无法用经纬度计算距离
- jq - 如何在 jq 中捕获“$variable is not defined”?
- c# - 指令后仍然无法使用 C# 进行循环
- python - 在 postman 中使用 Python Requests 做 post 请求
- spring-boot - 无法在 docker 上运行 JavaFX 应用程序超过几分钟
- php - 无法使用 psr-4 自动加载 php 类
- c++ - 将负数和正数相加到 10^100000
- python - 'SnowflakeCursor' 对象没有属性 'to_dict'
- django - 为他的第一个连接重定向用户