how does Angular HttpInterceptor get called?

178 Views Asked by At

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.

0

There are 0 best solutions below