├── BUILD_INFO ├── README.md ├── bundles ├── http-testing.umd.js ├── http-testing.umd.js.map ├── http-testing.umd.min.js ├── http-testing.umd.min.js.map ├── http.umd.js ├── http.umd.js.map ├── http.umd.min.js └── http.umd.min.js.map ├── esm2015 ├── http.externs.js ├── http.js ├── index.js ├── public_api.js ├── src │ ├── backends │ │ ├── browser_jsonp.js │ │ ├── browser_xhr.js │ │ ├── jsonp_backend.js │ │ └── xhr_backend.js │ ├── base_request_options.js │ ├── base_response_options.js │ ├── body.js │ ├── enums.js │ ├── headers.js │ ├── http.js │ ├── http_module.js │ ├── http_utils.js │ ├── index.js │ ├── interfaces.js │ ├── static_request.js │ ├── static_response.js │ ├── url_search_params.js │ └── version.js └── testing │ ├── index.js │ ├── public_api.js │ ├── src │ ├── mock_backend.js │ └── testing.js │ ├── testing.externs.js │ └── testing.js ├── esm5 ├── http.js ├── index.js ├── public_api.js ├── src │ ├── backends │ │ ├── browser_jsonp.js │ │ ├── browser_xhr.js │ │ ├── jsonp_backend.js │ │ └── xhr_backend.js │ ├── base_request_options.js │ ├── base_response_options.js │ ├── body.js │ ├── enums.js │ ├── headers.js │ ├── http.js │ ├── http_module.js │ ├── http_utils.js │ ├── index.js │ ├── interfaces.js │ ├── static_request.js │ ├── static_response.js │ ├── url_search_params.js │ └── version.js └── testing │ ├── index.js │ ├── public_api.js │ ├── src │ ├── mock_backend.js │ └── testing.js │ └── testing.js ├── fesm2015 ├── http.js ├── http.js.map ├── testing.js └── testing.js.map ├── fesm5 ├── http.js ├── http.js.map ├── testing.js └── testing.js.map ├── http.d.ts ├── http.metadata.json ├── package.json ├── testing.d.ts ├── testing.metadata.json └── testing ├── package.json ├── testing.d.ts └── testing.metadata.json /BUILD_INFO: -------------------------------------------------------------------------------- 1 | Tue Apr 2 18:12:10 UTC 2019 2 | 98f8b0f32833a445290dbf131974c8419b054009 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Angular 2 | ======= 3 | 4 | The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. 5 | 6 | License: MIT 7 | -------------------------------------------------------------------------------- /bundles/http-testing.umd.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Angular v8.0.0-beta.10+108.sha-98f8b0f.with-local-changes 3 | * (c) 2010-2019 Google LLC. https://angular.io/ 4 | * License: MIT 5 | */ 6 | 7 | (function (global, factory) { 8 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/http'), require('rxjs'), require('rxjs/operators')) : 9 | typeof define === 'function' && define.amd ? define('@angular/http/testing', ['exports', '@angular/core', '@angular/http', 'rxjs', 'rxjs/operators'], factory) : 10 | (global = global || self, factory((global.ng = global.ng || {}, global.ng.http = global.ng.http || {}, global.ng.http.testing = {}), global.ng.core, global.ng.http, global.rxjs, global.rxjs.operators)); 11 | }(this, function (exports, core, http, rxjs, operators) { 'use strict'; 12 | 13 | /*! ***************************************************************************** 14 | Copyright (c) Microsoft Corporation. All rights reserved. 15 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 16 | this file except in compliance with the License. You may obtain a copy of the 17 | License at http://www.apache.org/licenses/LICENSE-2.0 18 | 19 | THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 21 | WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 22 | MERCHANTABLITY OR NON-INFRINGEMENT. 23 | 24 | See the Apache Version 2.0 License for specific language governing permissions 25 | and limitations under the License. 26 | ***************************************************************************** */ 27 | 28 | function __decorate(decorators, target, key, desc) { 29 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 30 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 31 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 32 | return c > 3 && r && Object.defineProperty(target, key, r), r; 33 | } 34 | 35 | function __metadata(metadataKey, metadataValue) { 36 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); 37 | } 38 | 39 | /** 40 | * @license 41 | * Copyright Google Inc. All Rights Reserved. 42 | * 43 | * Use of this source code is governed by an MIT-style license that can be 44 | * found in the LICENSE file at https://angular.io/license 45 | */ 46 | /** 47 | * 48 | * Mock Connection to represent a {@link Connection} for tests. 49 | * 50 | * @usageNotes 51 | * ### Example of `mockRespond()` 52 | * 53 | * ``` 54 | * var connection; 55 | * backend.connections.subscribe(c => connection = c); 56 | * http.request('data.json').subscribe(res => console.log(res.text())); 57 | * connection.mockRespond(new Response(new ResponseOptions({ body: 'fake response' }))); //logs 58 | * 'fake response' 59 | * ``` 60 | * 61 | * ### Example of `mockError()` 62 | * 63 | * ``` 64 | * var connection; 65 | * backend.connections.subscribe(c => connection = c); 66 | * http.request('data.json').subscribe(res => res, err => console.log(err))); 67 | * connection.mockError(new Error('error')); 68 | * ``` 69 | * 70 | * @deprecated see https://angular.io/guide/http 71 | * @publicApi 72 | */ 73 | var MockConnection = /** @class */ (function () { 74 | function MockConnection(req) { 75 | this.response = new rxjs.ReplaySubject(1).pipe(operators.take(1)); 76 | this.readyState = http.ReadyState.Open; 77 | this.request = req; 78 | } 79 | /** 80 | * Sends a mock response to the connection. This response is the value that is emitted to the 81 | * {@link EventEmitter} returned by {@link Http}. 82 | * 83 | */ 84 | MockConnection.prototype.mockRespond = function (res) { 85 | if (this.readyState === http.ReadyState.Done || this.readyState === http.ReadyState.Cancelled) { 86 | throw new Error('Connection has already been resolved'); 87 | } 88 | this.readyState = http.ReadyState.Done; 89 | this.response.next(res); 90 | this.response.complete(); 91 | }; 92 | /** 93 | * Not yet implemented! 94 | * 95 | * Sends the provided {@link Response} to the `downloadObserver` of the `Request` 96 | * associated with this connection. 97 | */ 98 | MockConnection.prototype.mockDownload = function (res) { 99 | // this.request.downloadObserver.onNext(res); 100 | // if (res.bytesLoaded === res.totalBytes) { 101 | // this.request.downloadObserver.onCompleted(); 102 | // } 103 | }; 104 | // TODO(jeffbcross): consider using Response type 105 | /** 106 | * Emits the provided error object as an error to the {@link Response} {@link EventEmitter} 107 | * returned 108 | * from {@link Http}. 109 | * 110 | */ 111 | MockConnection.prototype.mockError = function (err) { 112 | // Matches ResourceLoader semantics 113 | this.readyState = http.ReadyState.Done; 114 | this.response.error(err); 115 | }; 116 | return MockConnection; 117 | }()); 118 | /** 119 | * A mock backend for testing the {@link Http} service. 120 | * 121 | * This class can be injected in tests, and should be used to override providers 122 | * to other backends, such as {@link XHRBackend}. 123 | * 124 | * @usageNotes 125 | * ### Example 126 | * 127 | * ``` 128 | * import {Injectable, Injector} from '@angular/core'; 129 | * import {async, fakeAsync, tick} from '@angular/core/testing'; 130 | * import {BaseRequestOptions, ConnectionBackend, Http, RequestOptions} from '@angular/http'; 131 | * import {Response, ResponseOptions} from '@angular/http'; 132 | * import {MockBackend, MockConnection} from '@angular/http/testing'; 133 | * 134 | * const HERO_ONE = 'HeroNrOne'; 135 | * const HERO_TWO = 'WillBeAlwaysTheSecond'; 136 | * 137 | * @Injectable() 138 | * class HeroService { 139 | * constructor(private http: Http) {} 140 | * 141 | * getHeroes(): Promise { 142 | * return this.http.get('myservices.de/api/heroes') 143 | * .toPromise() 144 | * .then(response => response.json().data) 145 | * .catch(e => this.handleError(e)); 146 | * } 147 | * 148 | * private handleError(error: any): Promise { 149 | * console.error('An error occurred', error); 150 | * return Promise.reject(error.message || error); 151 | * } 152 | * } 153 | * 154 | * describe('MockBackend HeroService Example', () => { 155 | * beforeEach(() => { 156 | * this.injector = Injector.create([ 157 | * {provide: ConnectionBackend, useClass: MockBackend}, 158 | * {provide: RequestOptions, useClass: BaseRequestOptions}, 159 | * Http, 160 | * HeroService, 161 | * ]); 162 | * this.heroService = this.injector.get(HeroService); 163 | * this.backend = this.injector.get(ConnectionBackend) as MockBackend; 164 | * this.backend.connections.subscribe((connection: any) => this.lastConnection = connection); 165 | * }); 166 | * 167 | * it('getHeroes() should query current service url', () => { 168 | * this.heroService.getHeroes(); 169 | * expect(this.lastConnection).toBeDefined('no http service connection at all?'); 170 | * expect(this.lastConnection.request.url).toMatch(/api\/heroes$/, 'url invalid'); 171 | * }); 172 | * 173 | * it('getHeroes() should return some heroes', fakeAsync(() => { 174 | * let result: String[]; 175 | * this.heroService.getHeroes().then((heroes: String[]) => result = heroes); 176 | * this.lastConnection.mockRespond(new Response(new ResponseOptions({ 177 | * body: JSON.stringify({data: [HERO_ONE, HERO_TWO]}), 178 | * }))); 179 | * tick(); 180 | * expect(result.length).toEqual(2, 'should contain given amount of heroes'); 181 | * expect(result[0]).toEqual(HERO_ONE, ' HERO_ONE should be the first hero'); 182 | * expect(result[1]).toEqual(HERO_TWO, ' HERO_TWO should be the second hero'); 183 | * })); 184 | * 185 | * it('getHeroes() while server is down', fakeAsync(() => { 186 | * let result: String[]; 187 | * let catchedError: any; 188 | * this.heroService.getHeroes() 189 | * .then((heroes: String[]) => result = heroes) 190 | * .catch((error: any) => catchedError = error); 191 | * this.lastConnection.mockError(new Response(new ResponseOptions({ 192 | * status: 404, 193 | * statusText: 'URL not Found', 194 | * }))); 195 | * tick(); 196 | * expect(result).toBeUndefined(); 197 | * expect(catchedError).toBeDefined(); 198 | * })); 199 | * }); 200 | * ``` 201 | * 202 | * @deprecated see https://angular.io/guide/http 203 | * @publicApi 204 | */ 205 | var MockBackend = /** @class */ (function () { 206 | function MockBackend() { 207 | var _this = this; 208 | this.connectionsArray = []; 209 | this.connections = new rxjs.Subject(); 210 | this.connections.subscribe(function (connection) { return _this.connectionsArray.push(connection); }); 211 | this.pendingConnections = new rxjs.Subject(); 212 | } 213 | /** 214 | * Checks all connections, and raises an exception if any connection has not received a response. 215 | * 216 | * This method only exists in the mock implementation, not in real Backends. 217 | */ 218 | MockBackend.prototype.verifyNoPendingRequests = function () { 219 | var pending = 0; 220 | this.pendingConnections.subscribe(function (c) { return pending++; }); 221 | if (pending > 0) 222 | throw new Error(pending + " pending connections to be resolved"); 223 | }; 224 | /** 225 | * Can be used in conjunction with `verifyNoPendingRequests` to resolve any not-yet-resolve 226 | * connections, if it's expected that there are connections that have not yet received a response. 227 | * 228 | * This method only exists in the mock implementation, not in real Backends. 229 | */ 230 | MockBackend.prototype.resolveAllConnections = function () { this.connections.subscribe(function (c) { return c.readyState = 4; }); }; 231 | /** 232 | * Creates a new {@link MockConnection}. This is equivalent to calling `new 233 | * MockConnection()`, except that it also will emit the new `Connection` to the `connections` 234 | * emitter of this `MockBackend` instance. This method will usually only be used by tests 235 | * against the framework itself, not by end-users. 236 | */ 237 | MockBackend.prototype.createConnection = function (req) { 238 | if (!req || !(req instanceof http.Request)) { 239 | throw new Error("createConnection requires an instance of Request, got " + req); 240 | } 241 | var connection = new MockConnection(req); 242 | this.connections.next(connection); 243 | return connection; 244 | }; 245 | MockBackend = __decorate([ 246 | core.Injectable(), 247 | __metadata("design:paramtypes", []) 248 | ], MockBackend); 249 | return MockBackend; 250 | }()); 251 | 252 | /** 253 | * @license 254 | * Copyright Google Inc. All Rights Reserved. 255 | * 256 | * Use of this source code is governed by an MIT-style license that can be 257 | * found in the LICENSE file at https://angular.io/license 258 | */ 259 | 260 | /** 261 | * @license 262 | * Copyright Google Inc. All Rights Reserved. 263 | * 264 | * Use of this source code is governed by an MIT-style license that can be 265 | * found in the LICENSE file at https://angular.io/license 266 | */ 267 | 268 | /** 269 | * @license 270 | * Copyright Google Inc. All Rights Reserved. 271 | * 272 | * Use of this source code is governed by an MIT-style license that can be 273 | * found in the LICENSE file at https://angular.io/license 274 | */ 275 | 276 | /** 277 | * Generated bundle index. Do not edit. 278 | */ 279 | 280 | exports.MockConnection = MockConnection; 281 | exports.MockBackend = MockBackend; 282 | 283 | Object.defineProperty(exports, '__esModule', { value: true }); 284 | 285 | })); 286 | //# sourceMappingURL=http-testing.umd.js.map 287 | -------------------------------------------------------------------------------- /bundles/http-testing.umd.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Angular v8.0.0-beta.10+108.sha-98f8b0f.with-local-changes 3 | * (c) 2010-2019 Google LLC. https://angular.io/ 4 | * License: MIT 5 | */ 6 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/http"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/http/testing",["exports","@angular/core","@angular/http","rxjs","rxjs/operators"],t):t(((e=e||self).ng=e.ng||{},e.ng.http=e.ng.http||{},e.ng.http.testing={}),e.ng.core,e.ng.http,e.rxjs,e.rxjs.operators)}(this,function(e,t,n,o,r){"use strict";function i(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)} 7 | /** 8 | * @license 9 | * Copyright Google Inc. All Rights Reserved. 10 | * 11 | * Use of this source code is governed by an MIT-style license that can be 12 | * found in the LICENSE file at https://angular.io/license 13 | */var c=function(){function e(e){this.response=new o.ReplaySubject(1).pipe(r.take(1)),this.readyState=n.ReadyState.Open,this.request=e}return e.prototype.mockRespond=function(e){if(this.readyState===n.ReadyState.Done||this.readyState===n.ReadyState.Cancelled)throw new Error("Connection has already been resolved");this.readyState=n.ReadyState.Done,this.response.next(e),this.response.complete()},e.prototype.mockDownload=function(e){},e.prototype.mockError=function(e){this.readyState=n.ReadyState.Done,this.response.error(e)},e}(),s=function(){function e(){var e=this;this.connectionsArray=[],this.connections=new o.Subject,this.connections.subscribe(function(t){return e.connectionsArray.push(t)}),this.pendingConnections=new o.Subject}return e.prototype.verifyNoPendingRequests=function(){var e=0;if(this.pendingConnections.subscribe(function(t){return e++}),e>0)throw new Error(e+" pending connections to be resolved")},e.prototype.resolveAllConnections=function(){this.connections.subscribe(function(e){return e.readyState=4})},e.prototype.createConnection=function(e){if(!(e&&e instanceof n.Request))throw new Error("createConnection requires an instance of Request, got "+e);var t=new c(e);return this.connections.next(t),t},function r(e,t,n,o){var r,i=arguments.length,c=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,n,c):r(t,n))||c);return i>3&&c&&Object.defineProperty(t,n,c),c}([t.Injectable(),i("design:paramtypes",[])],e)}(); 14 | /** 15 | * @license 16 | * Copyright Google Inc. All Rights Reserved. 17 | * 18 | * Use of this source code is governed by an MIT-style license that can be 19 | * found in the LICENSE file at https://angular.io/license 20 | */ 21 | /** 22 | * @license 23 | * Copyright Google Inc. All Rights Reserved. 24 | * 25 | * Use of this source code is governed by an MIT-style license that can be 26 | * found in the LICENSE file at https://angular.io/license 27 | */ 28 | /** 29 | * @license 30 | * Copyright Google Inc. All Rights Reserved. 31 | * 32 | * Use of this source code is governed by an MIT-style license that can be 33 | * found in the LICENSE file at https://angular.io/license 34 | */ 35 | e.MockConnection=c,e.MockBackend=s,Object.defineProperty(e,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /esm2015/http.externs.js: -------------------------------------------------------------------------------- 1 | /** @externs */ 2 | /** 3 | * @externs 4 | * @suppress {duplicate,checkTypes} 5 | */ 6 | // NOTE: generated by tsickle, do not edit. 7 | -------------------------------------------------------------------------------- /esm2015/http.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated bundle index. Do not edit. 3 | */ 4 | export * from './index'; 5 | export { BrowserJsonp as ɵangular_packages_http_http_e } from './src/backends/browser_jsonp'; 6 | export { Body as ɵangular_packages_http_http_f } from './src/body'; 7 | export { _createDefaultCookieXSRFStrategy as ɵangular_packages_http_http_a, httpFactory as ɵangular_packages_http_http_b, jsonpFactory as ɵangular_packages_http_http_c } from './src/http_module'; 8 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2h0dHAvaHR0cC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDO0FBRXhCLE9BQU8sRUFBQyxZQUFZLElBQUksNkJBQTZCLEVBQUMsTUFBTSw4QkFBOEIsQ0FBQztBQUMzRixPQUFPLEVBQUMsSUFBSSxJQUFJLDZCQUE2QixFQUFDLE1BQU0sWUFBWSxDQUFDO0FBQ2pFLE9BQU8sRUFBQyxnQ0FBZ0MsSUFBSSw2QkFBNkIsRUFBQyxXQUFXLElBQUksNkJBQTZCLEVBQUMsWUFBWSxJQUFJLDZCQUE2QixFQUFDLE1BQU0sbUJBQW1CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuXG5leHBvcnQge0Jyb3dzZXJKc29ucCBhcyDJtWFuZ3VsYXJfcGFja2FnZXNfaHR0cF9odHRwX2V9IGZyb20gJy4vc3JjL2JhY2tlbmRzL2Jyb3dzZXJfanNvbnAnO1xuZXhwb3J0IHtCb2R5IGFzIMm1YW5ndWxhcl9wYWNrYWdlc19odHRwX2h0dHBfZn0gZnJvbSAnLi9zcmMvYm9keSc7XG5leHBvcnQge19jcmVhdGVEZWZhdWx0Q29va2llWFNSRlN0cmF0ZWd5IGFzIMm1YW5ndWxhcl9wYWNrYWdlc19odHRwX2h0dHBfYSxodHRwRmFjdG9yeSBhcyDJtWFuZ3VsYXJfcGFja2FnZXNfaHR0cF9odHRwX2IsanNvbnBGYWN0b3J5IGFzIMm1YW5ndWxhcl9wYWNrYWdlc19odHRwX2h0dHBfY30gZnJvbSAnLi9zcmMvaHR0cF9tb2R1bGUnO1xuZXhwb3J0IHtSZXF1ZXN0QXJncyBhcyDJtWFuZ3VsYXJfcGFja2FnZXNfaHR0cF9odHRwX2R9IGZyb20gJy4vc3JjL2ludGVyZmFjZXMnOyJdfQ== -------------------------------------------------------------------------------- /esm2015/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview added by tsickle 3 | * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc 4 | */ 5 | /** 6 | * @license 7 | * Copyright Google Inc. All Rights Reserved. 8 | * 9 | * Use of this source code is governed by an MIT-style license that can be 10 | * found in the LICENSE file at https://angular.io/license 11 | */ 12 | // This file is not used to build this module. It is only used during editing 13 | // by the TypeScript language service and during build for verification. `ngc` 14 | // replaces this file with production index.ts when it rewrites private symbol 15 | // names. 16 | export { BrowserXhr, JSONPBackend, JSONPConnection, CookieXSRFStrategy, XHRBackend, XHRConnection, BaseRequestOptions, RequestOptions, BaseResponseOptions, ResponseOptions, ReadyState, RequestMethod, ResponseContentType, ResponseType, Headers, Http, Jsonp, HttpModule, JsonpModule, Connection, ConnectionBackend, XSRFStrategy, Request, Response, QueryEncoder, URLSearchParams, VERSION } from './public_api'; 17 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9odHRwL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7OztBQWFBLHdZQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cblxuLy8gVGhpcyBmaWxlIGlzIG5vdCB1c2VkIHRvIGJ1aWxkIHRoaXMgbW9kdWxlLiBJdCBpcyBvbmx5IHVzZWQgZHVyaW5nIGVkaXRpbmdcbi8vIGJ5IHRoZSBUeXBlU2NyaXB0IGxhbmd1YWdlIHNlcnZpY2UgYW5kIGR1cmluZyBidWlsZCBmb3IgdmVyaWZpY2F0aW9uLiBgbmdjYFxuLy8gcmVwbGFjZXMgdGhpcyBmaWxlIHdpdGggcHJvZHVjdGlvbiBpbmRleC50cyB3aGVuIGl0IHJld3JpdGVzIHByaXZhdGUgc3ltYm9sXG4vLyBuYW1lcy5cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ== -------------------------------------------------------------------------------- /esm2015/public_api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview added by tsickle 3 | * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc 4 | */ 5 | /** 6 | * @license 7 | * Copyright Google Inc. All Rights Reserved. 8 | * 9 | * Use of this source code is governed by an MIT-style license that can be 10 | * found in the LICENSE file at https://angular.io/license 11 | */ 12 | /** 13 | * @module 14 | * @description 15 | * Entry point for all public APIs of this package. 16 | */ 17 | export { BrowserXhr, JSONPBackend, JSONPConnection, CookieXSRFStrategy, XHRBackend, XHRConnection, BaseRequestOptions, RequestOptions, BaseResponseOptions, ResponseOptions, ReadyState, RequestMethod, ResponseContentType, ResponseType, Headers, Http, Jsonp, HttpModule, JsonpModule, Connection, ConnectionBackend, XSRFStrategy, Request, Response, QueryEncoder, URLSearchParams, VERSION } from './src/index'; 18 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2h0dHAvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBYUEsd1lBQWMsYUFBYSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG4vKipcbiAqIEBtb2R1bGVcbiAqIEBkZXNjcmlwdGlvblxuICogRW50cnkgcG9pbnQgZm9yIGFsbCBwdWJsaWMgQVBJcyBvZiB0aGlzIHBhY2thZ2UuXG4gKi9cbmV4cG9ydCAqIGZyb20gJy4vc3JjL2luZGV4JztcblxuLy8gVGhpcyBmaWxlIG9ubHkgcmVleHBvcnRzIGNvbnRlbnQgb2YgdGhlIGBzcmNgIGZvbGRlci4gS2VlcCBpdCB0aGF0IHdheS5cbiJdfQ== -------------------------------------------------------------------------------- /esm2015/src/backends/browser_jsonp.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview added by tsickle 3 | * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc 4 | */ 5 | /** 6 | * @license 7 | * Copyright Google Inc. All Rights Reserved. 8 | * 9 | * Use of this source code is governed by an MIT-style license that can be 10 | * found in the LICENSE file at https://angular.io/license 11 | */ 12 | import { Injectable } from '@angular/core'; 13 | /** @type {?} */ 14 | let _nextRequestId = 0; 15 | /** @type {?} */ 16 | export const JSONP_HOME = '__ng_jsonp__'; 17 | /** @type {?} */ 18 | let _jsonpConnections = null; 19 | /** 20 | * @return {?} 21 | */ 22 | function _getJsonpConnections() { 23 | /** @type {?} */ 24 | const w = typeof window == 'object' ? window : {}; 25 | if (_jsonpConnections === null) { 26 | _jsonpConnections = w[JSONP_HOME] = {}; 27 | } 28 | return _jsonpConnections; 29 | } 30 | // Make sure not to evaluate this in a non-browser environment! 31 | export class BrowserJsonp { 32 | // Construct a