Project

General

Profile

1 49598 stefanos.g
import { Observable } from 'rxjs/Observable';
2
import { HttpBackend } from './backend';
3
import { HttpRequest } from './request';
4
import { HttpEvent } from './response';
5
/**
6
 * A wrapper around the `XMLHttpRequest` constructor.
7
 *
8
 * @experimental
9
 */
10
export declare abstract class XhrFactory {
11
    abstract build(): XMLHttpRequest;
12
}
13
/**
14
 * A factory for @{link HttpXhrBackend} that uses the `XMLHttpRequest` browser API.
15
 *
16
 * @experimental
17
 */
18
export declare class BrowserXhr implements XhrFactory {
19
    constructor();
20
    build(): any;
21
}
22
/**
23
 * An `HttpBackend` which uses the XMLHttpRequest API to send
24
 * requests to a backend server.
25
 *
26
 * @experimental
27
 */
28
export declare class HttpXhrBackend implements HttpBackend {
29
    private xhrFactory;
30
    constructor(xhrFactory: XhrFactory);
31
    /**
32
     * Process a request and return a stream of response events.
33
     */
34
    handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
35
}