angular-interceptors
Version:
Useful interceptors for [Angular](https://github.com/angular/angular)
18 lines (17 loc) • 736 B
TypeScript
import { HttpEvent, HttpHandler, HttpInterceptor } from '@angular/common/http';
import { HttpRequest } from '@angular/common/http';
import { InjectionToken } from '@angular/core';
import { Observable } from 'rxjs';
export declare const MAX_AGE_MS: InjectionToken<string>;
export declare class CacheInterceptor implements HttpInterceptor {
maxAgeMs: any;
cache: Map<string, Observable<HttpEvent<any>>>;
constructor(maxAgeMs: any);
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
private isCachable(req);
}
export declare const CACHE_INTERCEPTOR_PROVIDER: {
provide: InjectionToken<HttpInterceptor[]>;
useClass: typeof CacheInterceptor;
multi: boolean;
};