首页 > 解决方案 > Angular HttpInterceptor 是如何被调用的?

问题描述

我试图在这里理解一些代码:

transfer_http.ts

我试图了解它如何使缓存无效:

// 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 请求。

标签: angularangular-universalangular-http-interceptorsangular-transfer-state

解决方案


推荐阅读