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