UNPKG

@kephas/ngx-core

Version:

Provides integration capabilities with Angular 13+.

39 lines (38 loc) 1.5 kB
import { HttpHandler, HttpBackend, HttpRequest, HttpEvent, HttpInterceptor } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Injector } from '@angular/core'; import * as i0 from "@angular/core"; /** * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`. * */ export declare class HttpInterceptorForwarder implements HttpHandler { private next; private interceptor; constructor(next: HttpHandler, interceptor: HttpInterceptor); handle(req: HttpRequest<any>): Observable<HttpEvent<any>>; } /** * An injectable `HttpHandler` that applies multiple interceptors * to a request before passing it to the given `HttpBackend`. * * The interceptors are loaded lazily from the injector, to allow * interceptors to themselves inject classes depending indirectly * on `HttpInterceptingHandler` itself. * @see `HttpInterceptor` */ export declare class HttpInterceptingHandler implements HttpHandler { private backend; private injector; private chain; /** * Creates an instance of HttpInterceptingHandler. * @param {HttpBackend} backend * @param {Injector} injector * @memberof HttpInterceptingHandler */ constructor(backend: HttpBackend, injector: Injector); handle(req: HttpRequest<any>): Observable<HttpEvent<any>>; static ɵfac: i0.ɵɵFactoryDeclaration<HttpInterceptingHandler, never>; static ɵprov: i0.ɵɵInjectableDeclaration<HttpInterceptingHandler>; }