jsonp_backend.d.ts
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { Observable } from 'rxjs/Observable';
import { ResponseOptions } from '../base_response_options';
import { ReadyState } from '../enums';
import { Connection, ConnectionBackend } from '../interfaces';
import { Request } from '../static_request';
import { Response } from '../static_response';
import { BrowserJsonp } from './browser_jsonp';
/**
* Abstract base class for an in-flight JSONP request.
*
* @experimental
*/
export declare abstract class JSONPConnection implements Connection {
/**
* The {@link ReadyState} of this request.
*/
readyState: ReadyState;
/**
* The outgoing HTTP request.
*/
request: Request;
/**
* An observable that completes with the response, when the request is finished.
*/
response: Observable<Response>;
/**
* Callback called when the JSONP request completes, to notify the application
* of the new data.
*/
abstract finished(data?: any): void;
}
export declare class JSONPConnection_ extends JSONPConnection {
private _dom;
private baseResponseOptions;
private _id;
private _script;
private _responseData;
private _finished;
constructor(req: Request, _dom: BrowserJsonp, baseResponseOptions?: ResponseOptions);
finished(data?: any): void;
}
/**
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests.
*
* @experimental
*/
export declare abstract class JSONPBackend extends ConnectionBackend {
}
export declare class JSONPBackend_ extends JSONPBackend {
private _browserJSONP;
private _baseResponseOptions;
constructor(_browserJSONP: BrowserJsonp, _baseResponseOptions: ResponseOptions);
createConnection(request: Request): JSONPConnection;
}