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