Project

General

Profile

1
/**
2
 * @license
3
 * Copyright Google Inc. All Rights Reserved.
4
 *
5
 * Use of this source code is governed by an MIT-style license that can be
6
 * found in the LICENSE file at https://angular.io/license
7
 */
8
import { Observable } from 'rxjs/Observable';
9
import { HttpRequest } from './request';
10
import { HttpEvent } from './response';
11
/**
12
 * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
13
 * `HttpResponse`.
14
 *
15
 * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
16
 * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
17
 * `HttpBackend`.
18
 *
19
 * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
20
 *
21
 * @experimental
22
 */
23
export declare abstract class HttpHandler {
24
    abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
25
}
26
/**
27
 * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
28
 *
29
 * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
30
 *
31
 * When injected, `HttpBackend` dispatches requests directly to the backend, without going
32
 * through the interceptor chain.
33
 *
34
 * @experimental
35
 */
36
export declare abstract class HttpBackend implements HttpHandler {
37
    abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
38
}
(1-1/11)