UNPKG

@kephas/angular

Version:

Provides integration capabilities with Angular.

62 lines (61 loc) 2 kB
import { HttpHandler, HttpBackend, XhrFactory, HttpRequest, HttpEvent, HttpInterceptor } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Injector, StaticClassProvider } from '@angular/core'; /** * Browser implementation for an `XhrFactory`. * * @export * @class BrowserXhrFactory * @implements {XhrFactory} */ export declare class BrowserXhrFactory implements XhrFactory { build(): XMLHttpRequest; } /** * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`. * * */ export declare class HttpInterceptorHandler 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>>; } /** * Registry for HTTP client services. * * @export * @class HttpClientAppServiceInfoRegistry */ export declare class HttpClientAppServiceInfoRegistry { /** * Gets the providers for the HTTP client. * * @returns {((StaticClassProvider | ExistingProvider)[])} * @memberof HttpClientAppServiceInfoRegistry */ getHttpClientProviders(): (StaticClassProvider)[]; }