how does Angular HttpInterceptor get called?

China☆狼群 提交于 2020-01-15 10:11:26

问题


I'm trying to understand some code here:

transfer_http.ts

I'm trying to understand how it invalidates the cache:

// Stop using the cache if there is a mutating call.
    if (req.method !== 'GET' && req.method !== 'HEAD') {
      this.isCacheActive = false;
      this.invalidateCacheEntry(req.url);
    }

How do you get a situation when req.method !== 'GET'? I only use GET requests.

来源:https://stackoverflow.com/questions/55213396/how-does-angular-httpinterceptor-get-called

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!