问题
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