{"version":3,"file":"http.js","sources":["../../../packages/http/esm5/src/backends/browser_xhr.js","../../../packages/http/esm5/src/enums.js","../../../packages/http/esm5/src/headers.js","../../../packages/http/esm5/src/base_response_options.js","../../../packages/http/esm5/src/interfaces.js","../../../packages/http/esm5/src/http_utils.js","../../../packages/http/esm5/src/url_search_params.js","../../../packages/http/esm5/src/body.js","../../../packages/http/esm5/src/static_response.js","../../../packages/http/esm5/src/backends/browser_jsonp.js","../../../packages/http/esm5/src/backends/jsonp_backend.js","../../../packages/http/esm5/src/backends/xhr_backend.js","../../../packages/http/esm5/src/base_request_options.js","../../../packages/http/esm5/src/static_request.js","../../../packages/http/esm5/src/http.js","../../../packages/http/esm5/src/http_module.js","../../../packages/http/esm5/src/version.js","../../../packages/http/esm5/src/index.js","../../../packages/http/esm5/public_api.js","../../../packages/http/esm5/http.js"],"sourcesContent":["/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Injectable } from '@angular/core';\n/**\n * A backend for http that uses the `XMLHttpRequest` browser API.\n *\n * Take care not to evaluate this in non-browser contexts.\n *\n * @deprecated use \\@angular/common/http instead\n */\nvar BrowserXhr = /** @class */ (function () {\n function BrowserXhr() {\n }\n /**\n * @return {?}\n */\n BrowserXhr.prototype.build = /**\n * @return {?}\n */\n function () { return /** @type {?} */ ((new XMLHttpRequest())); };\n BrowserXhr.decorators = [\n { type: Injectable },\n ];\n /** @nocollapse */\n BrowserXhr.ctorParameters = function () { return []; };\n return BrowserXhr;\n}());\nexport { BrowserXhr };\nfunction BrowserXhr_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */\n BrowserXhr.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>}\n */\n BrowserXhr.ctorParameters;\n}\n//# sourceMappingURL=browser_xhr.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @enum {number} */\nvar RequestMethod = {\n Get: 0,\n Post: 1,\n Put: 2,\n Delete: 3,\n Options: 4,\n Head: 5,\n Patch: 6,\n};\nexport { RequestMethod };\nRequestMethod[RequestMethod.Get] = \"Get\";\nRequestMethod[RequestMethod.Post] = \"Post\";\nRequestMethod[RequestMethod.Put] = \"Put\";\nRequestMethod[RequestMethod.Delete] = \"Delete\";\nRequestMethod[RequestMethod.Options] = \"Options\";\nRequestMethod[RequestMethod.Head] = \"Head\";\nRequestMethod[RequestMethod.Patch] = \"Patch\";\n/** @enum {number} */\nvar ReadyState = {\n Unsent: 0,\n Open: 1,\n HeadersReceived: 2,\n Loading: 3,\n Done: 4,\n Cancelled: 5,\n};\nexport { ReadyState };\nReadyState[ReadyState.Unsent] = \"Unsent\";\nReadyState[ReadyState.Open] = \"Open\";\nReadyState[ReadyState.HeadersReceived] = \"HeadersReceived\";\nReadyState[ReadyState.Loading] = \"Loading\";\nReadyState[ReadyState.Done] = \"Done\";\nReadyState[ReadyState.Cancelled] = \"Cancelled\";\n/** @enum {number} */\nvar ResponseType = {\n Basic: 0,\n Cors: 1,\n Default: 2,\n Error: 3,\n Opaque: 4,\n};\nexport { ResponseType };\nResponseType[ResponseType.Basic] = \"Basic\";\nResponseType[ResponseType.Cors] = \"Cors\";\nResponseType[ResponseType.Default] = \"Default\";\nResponseType[ResponseType.Error] = \"Error\";\nResponseType[ResponseType.Opaque] = \"Opaque\";\n/** @enum {number} */\nvar ContentType = {\n NONE: 0,\n JSON: 1,\n FORM: 2,\n FORM_DATA: 3,\n TEXT: 4,\n BLOB: 5,\n ARRAY_BUFFER: 6,\n};\nexport { ContentType };\nContentType[ContentType.NONE] = \"NONE\";\nContentType[ContentType.JSON] = \"JSON\";\nContentType[ContentType.FORM] = \"FORM\";\nContentType[ContentType.FORM_DATA] = \"FORM_DATA\";\nContentType[ContentType.TEXT] = \"TEXT\";\nContentType[ContentType.BLOB] = \"BLOB\";\nContentType[ContentType.ARRAY_BUFFER] = \"ARRAY_BUFFER\";\n/** @enum {number} */\nvar ResponseContentType = {\n Text: 0,\n Json: 1,\n ArrayBuffer: 2,\n Blob: 3,\n};\nexport { ResponseContentType };\nResponseContentType[ResponseContentType.Text] = \"Text\";\nResponseContentType[ResponseContentType.Json] = \"Json\";\nResponseContentType[ResponseContentType.ArrayBuffer] = \"ArrayBuffer\";\nResponseContentType[ResponseContentType.Blob] = \"Blob\";\n//# sourceMappingURL=enums.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as\n * specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class).\n *\n * The only known difference between this `Headers` implementation and the spec is the\n * lack of an `entries` method.\n *\n * ### Example\n *\n * ```\n * import {Headers} from '\\@angular/http';\n *\n * var firstHeaders = new Headers();\n * firstHeaders.append('Content-Type', 'image/jpeg');\n * console.log(firstHeaders.get('Content-Type')) //'image/jpeg'\n *\n * // Create headers from Plain Old JavaScript Object\n * var secondHeaders = new Headers({\n * 'X-My-Custom-Header': 'Angular'\n * });\n * console.log(secondHeaders.get('X-My-Custom-Header')); //'Angular'\n *\n * var thirdHeaders = new Headers(secondHeaders);\n * console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'\n * ```\n *\n * @deprecated use \\@angular/common/http instead\n */\nvar /**\n * Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as\n * specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class).\n *\n * The only known difference between this `Headers` implementation and the spec is the\n * lack of an `entries` method.\n *\n * ### Example\n *\n * ```\n * import {Headers} from '\\@angular/http';\n *\n * var firstHeaders = new Headers();\n * firstHeaders.append('Content-Type', 'image/jpeg');\n * console.log(firstHeaders.get('Content-Type')) //'image/jpeg'\n *\n * // Create headers from Plain Old JavaScript Object\n * var secondHeaders = new Headers({\n * 'X-My-Custom-Header': 'Angular'\n * });\n * console.log(secondHeaders.get('X-My-Custom-Header')); //'Angular'\n *\n * var thirdHeaders = new Headers(secondHeaders);\n * console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'\n * ```\n *\n * @deprecated use \\@angular/common/http instead\n */\nHeaders = /** @class */ (function () {\n // TODO(vicb): any -> string|string[]\n function Headers(headers) {\n var _this = this;\n /**\n * \\@internal header names are lower case\n */\n this._headers = new Map();\n /**\n * \\@internal map lower case names to actual names\n */\n this._normalizedNames = new Map();\n if (!headers) {\n return;\n }\n if (headers instanceof Headers) {\n headers.forEach(function (values, name) {\n values.forEach(function (value) { return _this.append(name, value); });\n });\n return;\n }\n Object.keys(headers).forEach(function (name) {\n var /** @type {?} */ values = Array.isArray(headers[name]) ? headers[name] : [headers[name]];\n _this.delete(name);\n values.forEach(function (value) { return _this.append(name, value); });\n });\n }\n /**\n * Returns a new Headers instance from the given DOMString of Response Headers\n */\n /**\n * Returns a new Headers instance from the given DOMString of Response Headers\n * @param {?} headersString\n * @return {?}\n */\n Headers.fromResponseHeaderString = /**\n * Returns a new Headers instance from the given DOMString of Response Headers\n * @param {?} headersString\n * @return {?}\n */\n function (headersString) {\n var /** @type {?} */ headers = new Headers();\n headersString.split('\\n').forEach(function (line) {\n var /** @type {?} */ index = line.indexOf(':');\n if (index > 0) {\n var /** @type {?} */ name_1 = line.slice(0, index);\n var /** @type {?} */ value = line.slice(index + 1).trim();\n headers.set(name_1, value);\n }\n });\n return headers;\n };\n /**\n * Appends a header to existing list of header values for a given header name.\n */\n /**\n * Appends a header to existing list of header values for a given header name.\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\n Headers.prototype.append = /**\n * Appends a header to existing list of header values for a given header name.\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\n function (name, value) {\n var /** @type {?} */ values = this.getAll(name);\n if (values === null) {\n this.set(name, value);\n }\n else {\n values.push(value);\n }\n };\n /**\n * Deletes all header values for the given name.\n */\n /**\n * Deletes all header values for the given name.\n * @param {?} name\n * @return {?}\n */\n Headers.prototype.delete = /**\n * Deletes all header values for the given name.\n * @param {?} name\n * @return {?}\n */\n function (name) {\n var /** @type {?} */ lcName = name.toLowerCase();\n this._normalizedNames.delete(lcName);\n this._headers.delete(lcName);\n };\n /**\n * @param {?} fn\n * @return {?}\n */\n Headers.prototype.forEach = /**\n * @param {?} fn\n * @return {?}\n */\n function (fn) {\n var _this = this;\n this._headers.forEach(function (values, lcName) { return fn(values, _this._normalizedNames.get(lcName), _this._headers); });\n };\n /**\n * Returns first header that matches given name.\n */\n /**\n * Returns first header that matches given name.\n * @param {?} name\n * @return {?}\n */\n Headers.prototype.get = /**\n * Returns first header that matches given name.\n * @param {?} name\n * @return {?}\n */\n function (name) {\n var /** @type {?} */ values = this.getAll(name);\n if (values === null) {\n return null;\n }\n return values.length > 0 ? values[0] : null;\n };\n /**\n * Checks for existence of header by given name.\n */\n /**\n * Checks for existence of header by given name.\n * @param {?} name\n * @return {?}\n */\n Headers.prototype.has = /**\n * Checks for existence of header by given name.\n * @param {?} name\n * @return {?}\n */\n function (name) { return this._headers.has(name.toLowerCase()); };\n /**\n * Returns the names of the headers\n */\n /**\n * Returns the names of the headers\n * @return {?}\n */\n Headers.prototype.keys = /**\n * Returns the names of the headers\n * @return {?}\n */\n function () { return Array.from(this._normalizedNames.values()); };\n /**\n * Sets or overrides header value for given name.\n */\n /**\n * Sets or overrides header value for given name.\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\n Headers.prototype.set = /**\n * Sets or overrides header value for given name.\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\n function (name, value) {\n if (Array.isArray(value)) {\n if (value.length) {\n this._headers.set(name.toLowerCase(), [value.join(',')]);\n }\n }\n else {\n this._headers.set(name.toLowerCase(), [value]);\n }\n this.mayBeSetNormalizedName(name);\n };\n /**\n * Returns values of all headers.\n */\n /**\n * Returns values of all headers.\n * @return {?}\n */\n Headers.prototype.values = /**\n * Returns values of all headers.\n * @return {?}\n */\n function () { return Array.from(this._headers.values()); };\n /**\n * Returns string of all headers.\n */\n // TODO(vicb): returns {[name: string]: string[]}\n /**\n * Returns string of all headers.\n * @return {?}\n */\n Headers.prototype.toJSON = /**\n * Returns string of all headers.\n * @return {?}\n */\n function () {\n var _this = this;\n var /** @type {?} */ serialized = {};\n this._headers.forEach(function (values, name) {\n var /** @type {?} */ split = [];\n values.forEach(function (v) { return split.push.apply(split, v.split(',')); });\n serialized[/** @type {?} */ ((_this._normalizedNames.get(name)))] = split;\n });\n return serialized;\n };\n /**\n * Returns list of header values for a given name.\n */\n /**\n * Returns list of header values for a given name.\n * @param {?} name\n * @return {?}\n */\n Headers.prototype.getAll = /**\n * Returns list of header values for a given name.\n * @param {?} name\n * @return {?}\n */\n function (name) {\n return this.has(name) ? this._headers.get(name.toLowerCase()) || null : null;\n };\n /**\n * This method is not implemented.\n */\n /**\n * This method is not implemented.\n * @return {?}\n */\n Headers.prototype.entries = /**\n * This method is not implemented.\n * @return {?}\n */\n function () { throw new Error('\"entries\" method is not implemented on Headers class'); };\n /**\n * @param {?} name\n * @return {?}\n */\n Headers.prototype.mayBeSetNormalizedName = /**\n * @param {?} name\n * @return {?}\n */\n function (name) {\n var /** @type {?} */ lcName = name.toLowerCase();\n if (!this._normalizedNames.has(lcName)) {\n this._normalizedNames.set(lcName, name);\n }\n };\n return Headers;\n}());\n/**\n * Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as\n * specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class).\n *\n * The only known difference between this `Headers` implementation and the spec is the\n * lack of an `entries` method.\n *\n * ### Example\n *\n * ```\n * import {Headers} from '\\@angular/http';\n *\n * var firstHeaders = new Headers();\n * firstHeaders.append('Content-Type', 'image/jpeg');\n * console.log(firstHeaders.get('Content-Type')) //'image/jpeg'\n *\n * // Create headers from Plain Old JavaScript Object\n * var secondHeaders = new Headers({\n * 'X-My-Custom-Header': 'Angular'\n * });\n * console.log(secondHeaders.get('X-My-Custom-Header')); //'Angular'\n *\n * var thirdHeaders = new Headers(secondHeaders);\n * console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'\n * ```\n *\n * @deprecated use \\@angular/common/http instead\n */\nexport { Headers };\nfunction Headers_tsickle_Closure_declarations() {\n /**\n * \\@internal header names are lower case\n * @type {?}\n */\n Headers.prototype._headers;\n /**\n * \\@internal map lower case names to actual names\n * @type {?}\n */\n Headers.prototype._normalizedNames;\n}\n//# sourceMappingURL=headers.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as tslib_1 from \"tslib\";\nimport { Injectable } from '@angular/core';\nimport { ResponseType } from './enums';\nimport { Headers } from './headers';\n/**\n * Creates a response options object to be optionally provided when instantiating a\n * {\\@link Response}.\n *\n * This class is based on the `ResponseInit` description in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#responseinit).\n *\n * All values are null by default. Typical defaults can be found in the\n * {\\@link BaseResponseOptions} class, which sub-classes `ResponseOptions`.\n *\n * This class may be used in tests to build {\\@link Response Responses} for\n * mock responses (see {\\@link MockBackend}).\n *\n * ### Example ([live demo](http://plnkr.co/edit/P9Jkk8e8cz6NVzbcxEsD?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '\\@angular/http';\n *\n * var options = new ResponseOptions({\n * body: '{\"name\":\"Jeff\"}'\n * });\n * var res = new Response(options);\n *\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * ```\n *\n * @deprecated use \\@angular/common/http instead\n */\nvar /**\n * Creates a response options object to be optionally provided when instantiating a\n * {\\@link Response}.\n *\n * This class is based on the `ResponseInit` description in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#responseinit).\n *\n * All values are null by default. Typical defaults can be found in the\n * {\\@link BaseResponseOptions} class, which sub-classes `ResponseOptions`.\n *\n * This class may be used in tests to build {\\@link Response Responses} for\n * mock responses (see {\\@link MockBackend}).\n *\n * ### Example ([live demo](http://plnkr.co/edit/P9Jkk8e8cz6NVzbcxEsD?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '\\@angular/http';\n *\n * var options = new ResponseOptions({\n * body: '{\"name\":\"Jeff\"}'\n * });\n * var res = new Response(options);\n *\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * ```\n *\n * @deprecated use \\@angular/common/http instead\n */\nResponseOptions = /** @class */ (function () {\n function ResponseOptions(opts) {\n if (opts === void 0) { opts = {}; }\n var body = opts.body, status = opts.status, headers = opts.headers, statusText = opts.statusText, type = opts.type, url = opts.url;\n this.body = body != null ? body : null;\n this.status = status != null ? status : null;\n this.headers = headers != null ? headers : null;\n this.statusText = statusText != null ? statusText : null;\n this.type = type != null ? type : null;\n this.url = url != null ? url : null;\n }\n /**\n * Creates a copy of the `ResponseOptions` instance, using the optional input as values to\n * override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * This may be useful when sharing a base `ResponseOptions` object inside tests,\n * where certain properties may change from test to test.\n *\n * ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '@angular/http';\n *\n * var options = new ResponseOptions({\n * body: {name: 'Jeff'}\n * });\n * var res = new Response(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('options.url:', options.url); // null\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * console.log('res.url:', res.url); // https://google.com\n * ```\n */\n /**\n * Creates a copy of the `ResponseOptions` instance, using the optional input as values to\n * override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * This may be useful when sharing a base `ResponseOptions` object inside tests,\n * where certain properties may change from test to test.\n *\n * ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '\\@angular/http';\n *\n * var options = new ResponseOptions({\n * body: {name: 'Jeff'}\n * });\n * var res = new Response(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('options.url:', options.url); // null\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * console.log('res.url:', res.url); // https://google.com\n * ```\n * @param {?=} options\n * @return {?}\n */\n ResponseOptions.prototype.merge = /**\n * Creates a copy of the `ResponseOptions` instance, using the optional input as values to\n * override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * This may be useful when sharing a base `ResponseOptions` object inside tests,\n * where certain properties may change from test to test.\n *\n * ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '\\@angular/http';\n *\n * var options = new ResponseOptions({\n * body: {name: 'Jeff'}\n * });\n * var res = new Response(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('options.url:', options.url); // null\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * console.log('res.url:', res.url); // https://google.com\n * ```\n * @param {?=} options\n * @return {?}\n */\n function (options) {\n return new ResponseOptions({\n body: options && options.body != null ? options.body : this.body,\n status: options && options.status != null ? options.status : this.status,\n headers: options && options.headers != null ? options.headers : this.headers,\n statusText: options && options.statusText != null ? options.statusText : this.statusText,\n type: options && options.type != null ? options.type : this.type,\n url: options && options.url != null ? options.url : this.url,\n });\n };\n return ResponseOptions;\n}());\n/**\n * Creates a response options object to be optionally provided when instantiating a\n * {\\@link Response}.\n *\n * This class is based on the `ResponseInit` description in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#responseinit).\n *\n * All values are null by default. Typical defaults can be found in the\n * {\\@link BaseResponseOptions} class, which sub-classes `ResponseOptions`.\n *\n * This class may be used in tests to build {\\@link Response Responses} for\n * mock responses (see {\\@link MockBackend}).\n *\n * ### Example ([live demo](http://plnkr.co/edit/P9Jkk8e8cz6NVzbcxEsD?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '\\@angular/http';\n *\n * var options = new ResponseOptions({\n * body: '{\"name\":\"Jeff\"}'\n * });\n * var res = new Response(options);\n *\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * ```\n *\n * @deprecated use \\@angular/common/http instead\n */\nexport { ResponseOptions };\nfunction ResponseOptions_tsickle_Closure_declarations() {\n /**\n * String, Object, ArrayBuffer or Blob representing the body of the {\\@link Response}.\n * @type {?}\n */\n ResponseOptions.prototype.body;\n /**\n * Http {\\@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html status code}\n * associated with the response.\n * @type {?}\n */\n ResponseOptions.prototype.status;\n /**\n * Response {\\@link Headers headers}\n * @type {?}\n */\n ResponseOptions.prototype.headers;\n /**\n * \\@internal\n * @type {?}\n */\n ResponseOptions.prototype.statusText;\n /**\n * \\@internal\n * @type {?}\n */\n ResponseOptions.prototype.type;\n /** @type {?} */\n ResponseOptions.prototype.url;\n}\n/**\n * Subclass of {\\@link ResponseOptions}, with default values.\n *\n * Default values:\n * * status: 200\n * * headers: empty {\\@link Headers} object\n *\n * This class could be extended and bound to the {\\@link ResponseOptions} class\n * when configuring an {\\@link Injector}, in order to override the default options\n * used by {\\@link Http} to create {\\@link Response Responses}.\n *\n * ### Example ([live demo](http://plnkr.co/edit/qv8DLT?p=preview))\n *\n * ```typescript\n * import {provide} from '\\@angular/core';\n * import {bootstrap} from '\\@angular/platform-browser/browser';\n * import {HTTP_PROVIDERS, Headers, Http, BaseResponseOptions, ResponseOptions} from\n * '\\@angular/http';\n * import {App} from './myapp';\n *\n * class MyOptions extends BaseResponseOptions {\n * headers:Headers = new Headers({network: 'github'});\n * }\n *\n * bootstrap(App, [HTTP_PROVIDERS, {provide: ResponseOptions, useClass: MyOptions}]);\n * ```\n *\n * The options could also be extended when manually creating a {\\@link Response}\n * object.\n *\n * ### Example ([live demo](http://plnkr.co/edit/VngosOWiaExEtbstDoix?p=preview))\n *\n * ```\n * import {BaseResponseOptions, Response} from '\\@angular/http';\n *\n * var options = new BaseResponseOptions();\n * var res = new Response(options.merge({\n * body: 'Angular',\n * headers: new Headers({framework: 'angular'})\n * }));\n * console.log('res.headers.get(\"framework\"):', res.headers.get('framework')); // angular\n * console.log('res.text():', res.text()); // Angular;\n * ```\n *\n * @deprecated use \\@angular/common/http instead\n */\nvar BaseResponseOptions = /** @class */ (function (_super) {\n tslib_1.__extends(BaseResponseOptions, _super);\n function BaseResponseOptions() {\n return _super.call(this, { status: 200, statusText: 'Ok', type: ResponseType.Default, headers: new Headers() }) || this;\n }\n BaseResponseOptions.decorators = [\n { type: Injectable },\n ];\n /** @nocollapse */\n BaseResponseOptions.ctorParameters = function () { return []; };\n return BaseResponseOptions;\n}(ResponseOptions));\nexport { BaseResponseOptions };\nfunction BaseResponseOptions_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */\n BaseResponseOptions.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>}\n */\n BaseResponseOptions.ctorParameters;\n}\n//# sourceMappingURL=base_response_options.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Abstract class from which real backends are derived.\n *\n * The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given\n * {\\@link Request}.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nvar /**\n * Abstract class from which real backends are derived.\n *\n * The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given\n * {\\@link Request}.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nConnectionBackend = /** @class */ (function () {\n function ConnectionBackend() {\n }\n return ConnectionBackend;\n}());\n/**\n * Abstract class from which real backends are derived.\n *\n * The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given\n * {\\@link Request}.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nexport { ConnectionBackend };\nfunction ConnectionBackend_tsickle_Closure_declarations() {\n /**\n * @abstract\n * @param {?} request\n * @return {?}\n */\n ConnectionBackend.prototype.createConnection = function (request) { };\n}\n/**\n * Abstract class from which real connections are derived.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nvar /**\n * Abstract class from which real connections are derived.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nConnection = /** @class */ (function () {\n function Connection() {\n }\n return Connection;\n}());\n/**\n * Abstract class from which real connections are derived.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nexport { Connection };\nfunction Connection_tsickle_Closure_declarations() {\n /** @type {?} */\n Connection.prototype.readyState;\n /** @type {?} */\n Connection.prototype.request;\n /** @type {?} */\n Connection.prototype.response;\n}\n/**\n * An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nvar /**\n * An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nXSRFStrategy = /** @class */ (function () {\n function XSRFStrategy() {\n }\n return XSRFStrategy;\n}());\n/**\n * An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.\n *\n * @deprecated use \\@angular/common/http instead\n * @abstract\n */\nexport { XSRFStrategy };\nfunction XSRFStrategy_tsickle_Closure_declarations() {\n /**\n * @abstract\n * @param {?} req\n * @return {?}\n */\n XSRFStrategy.prototype.configureRequest = function (req) { };\n}\n/**\n * Interface for options to construct a RequestOptions, based on\n * [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec.\n *\n * @deprecated use \\@angular/common/http instead\n * @record\n */\nexport function RequestOptionsArgs() { }\nfunction RequestOptionsArgs_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n RequestOptionsArgs.prototype.url;\n /** @type {?|undefined} */\n RequestOptionsArgs.prototype.method;\n /**\n * @deprecated from 4.0.0. Use params instead.\n * @type {?|undefined}\n */\n RequestOptionsArgs.prototype.search;\n /** @type {?|undefined} */\n RequestOptionsArgs.prototype.params;\n /** @type {?|undefined} */\n RequestOptionsArgs.prototype.headers;\n /** @type {?|undefined} */\n RequestOptionsArgs.prototype.body;\n /** @type {?|undefined} */\n RequestOptionsArgs.prototype.withCredentials;\n /** @type {?|undefined} */\n RequestOptionsArgs.prototype.responseType;\n}\n/**\n * Required structure when constructing new Request();\n * @record\n */\nexport function RequestArgs() { }\nfunction RequestArgs_tsickle_Closure_declarations() {\n /** @type {?} */\n RequestArgs.prototype.url;\n}\n/**\n * Interface for options to construct a Response, based on\n * [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec.\n *\n * @deprecated use \\@angular/common/http instead\n * @record\n */\nexport function ResponseOptionsArgs() { }\nfunction ResponseOptionsArgs_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n ResponseOptionsArgs.prototype.body;\n /** @type {?|undefined} */\n ResponseOptionsArgs.prototype.status;\n /** @type {?|undefined} */\n ResponseOptionsArgs.prototype.statusText;\n /** @type {?|undefined} */\n ResponseOptionsArgs.prototype.headers;\n /** @type {?|undefined} */\n ResponseOptionsArgs.prototype.type;\n /** @type {?|undefined} */\n ResponseOptionsArgs.prototype.url;\n}\n//# sourceMappingURL=interfaces.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { RequestMethod } from './enums';\n/**\n * @param {?} method\n * @return {?}\n */\nexport function normalizeMethodName(method) {\n if (typeof method !== 'string')\n return method;\n switch (method.toUpperCase()) {\n case 'GET':\n return RequestMethod.Get;\n case 'POST':\n return RequestMethod.Post;\n case 'PUT':\n return RequestMethod.Put;\n case 'DELETE':\n return RequestMethod.Delete;\n case 'OPTIONS':\n return RequestMethod.Options;\n case 'HEAD':\n return RequestMethod.Head;\n case 'PATCH':\n return RequestMethod.Patch;\n }\n throw new Error(\"Invalid request method. The method \\\"\" + method + \"\\\" is not supported.\");\n}\nexport var /** @type {?} */ isSuccess = function (status) { return (status >= 200 && status < 300); };\n/**\n * @param {?} xhr\n * @return {?}\n */\nexport function getResponseURL(xhr) {\n if ('responseURL' in xhr) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n/**\n * @param {?} input\n * @return {?}\n */\nexport function stringToArrayBuffer8(input) {\n var /** @type {?} */ view = new Uint8Array(input.length);\n for (var /** @type {?} */ i = 0, /** @type {?} */ strLen = input.length; i < strLen; i++) {\n view[i] = input.charCodeAt(i);\n }\n return view.buffer;\n}\n/**\n * @param {?} input\n * @return {?}\n */\nexport function stringToArrayBuffer(input) {\n var /** @type {?} */ view = new Uint16Array(input.length);\n for (var /** @type {?} */ i = 0, /** @type {?} */ strLen = input.length; i < strLen; i++) {\n view[i] = input.charCodeAt(i);\n }\n return view.buffer;\n}\n//# sourceMappingURL=http_utils.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @param {?=} rawParams\n * @return {?}\n */\nfunction paramParser(rawParams) {\n if (rawParams === void 0) { rawParams = ''; }\n var /** @type {?} */ map = new Map();\n if (rawParams.length > 0) {\n var /** @type {?} */ params = rawParams.split('&');\n params.forEach(function (param) {\n var /** @type {?} */ eqIdx = param.indexOf('=');\n var _a = eqIdx == -1 ? [param, ''] : [param.slice(0, eqIdx), param.slice(eqIdx + 1)], key = _a[0], val = _a[1];\n var /** @type {?} */ list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n/**\n * @deprecated use \\@angular/common/http instead\n *\n */\nvar /**\n * @deprecated use \\@angular/common/http instead\n *\n */\nQueryEncoder = /** @class */ (function () {\n function QueryEncoder() {\n }\n /**\n * @param {?} k\n * @return {?}\n */\n QueryEncoder.prototype.encodeKey = /**\n * @param {?} k\n * @return {?}\n */\n function (k) { return standardEncoding(k); };\n /**\n * @param {?} v\n * @return {?}\n */\n QueryEncoder.prototype.encodeValue = /**\n * @param {?} v\n * @return {?}\n */\n function (v) { return standardEncoding(v); };\n return QueryEncoder;\n}());\n/**\n * @deprecated use \\@angular/common/http instead\n *\n */\nexport { QueryEncoder };\n/**\n * @param {?} v\n * @return {?}\n */\nfunction standardEncoding(v) {\n return encodeURIComponent(v)\n .replace(/%40/gi, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/gi, '$')\n .replace(/%2C/gi, ',')\n .replace(/%3B/gi, ';')\n .replace(/%2B/gi, '+')\n .replace(/%3D/gi, '=')\n .replace(/%3F/gi, '?')\n .replace(/%2F/gi, '/');\n}\n/**\n * Map-like representation of url search parameters, based on\n * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard,\n * with several extensions for merging URLSearchParams objects:\n * - setAll()\n * - appendAll()\n * - replaceAll()\n *\n * This class accepts an optional second parameter of ${\\@link QueryEncoder},\n * which is used to serialize parameters before making a request. By default,\n * `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`,\n * and then un-encodes certain characters that are allowed to be part of the query\n * according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986.\n *\n * These are the characters that are not encoded: `! $ \\' ( ) * + , ; A 9 - . _ ~ ? /`\n *\n * If the set of allowed query characters is not acceptable for a particular backend,\n * `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams.\n *\n * ```\n * import {URLSearchParams, QueryEncoder} from '\\@angular/http';\n * class MyQueryEncoder extends QueryEncoder {\n * encodeKey(k: string): string {\n * return myEncodingFunction(k);\n * }\n *\n * encodeValue(v: string): string {\n * return myEncodingFunction(v);\n * }\n * }\n *\n * let params = new URLSearchParams('', new MyQueryEncoder());\n * ```\n * @deprecated use \\@angular/common/http instead\n */\nvar /**\n * Map-like representation of url search parameters, based on\n * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard,\n * with several extensions for merging URLSearchParams objects:\n * - setAll()\n * - appendAll()\n * - replaceAll()\n *\n * This class accepts an optional second parameter of ${\\@link QueryEncoder},\n * which is used to serialize parameters before making a request. By default,\n * `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`,\n * and then un-encodes certain characters that are allowed to be part of the query\n * according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986.\n *\n * These are the characters that are not encoded: `! $ \\' ( ) * + , ; A 9 - . _ ~ ? /`\n *\n * If the set of allowed query characters is not acceptable for a particular backend,\n * `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams.\n *\n * ```\n * import {URLSearchParams, QueryEncoder} from '\\@angular/http';\n * class MyQueryEncoder extends QueryEncoder {\n * encodeKey(k: string): string {\n * return myEncodingFunction(k);\n * }\n *\n * encodeValue(v: string): string {\n * return myEncodingFunction(v);\n * }\n * }\n *\n * let params = new URLSearchParams('', new MyQueryEncoder());\n * ```\n * @deprecated use \\@angular/common/http instead\n */\nURLSearchParams = /** @class */ (function () {\n function URLSearchParams(rawParams, queryEncoder) {\n if (rawParams === void 0) { rawParams = ''; }\n if (queryEncoder === void 0) { queryEncoder = new QueryEncoder(); }\n this.rawParams = rawParams;\n this.queryEncoder = queryEncoder;\n this.paramsMap = paramParser(rawParams);\n }\n /**\n * @return {?}\n */\n URLSearchParams.prototype.clone = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ clone = new URLSearchParams('', this.queryEncoder);\n clone.appendAll(this);\n return clone;\n };\n /**\n * @param {?} param\n * @return {?}\n */\n URLSearchParams.prototype.has = /**\n * @param {?} param\n * @return {?}\n */\n function (param) { return this.paramsMap.has(param); };\n /**\n * @param {?} param\n * @return {?}\n */\n URLSearchParams.prototype.get = /**\n * @param {?} param\n * @return {?}\n */\n function (param) {\n var /** @type {?} */ storedParam = this.paramsMap.get(param);\n return Array.isArray(storedParam) ? storedParam[0] : null;\n };\n /**\n * @param {?} param\n * @return {?}\n */\n URLSearchParams.prototype.getAll = /**\n * @param {?} param\n * @return {?}\n */\n function (param) { return this.paramsMap.get(param) || []; };\n /**\n * @param {?} param\n * @param {?} val\n * @return {?}\n */\n URLSearchParams.prototype.set = /**\n * @param {?} param\n * @param {?} val\n * @return {?}\n */\n function (param, val) {\n if (val === void 0 || val === null) {\n this.delete(param);\n return;\n }\n var /** @type {?} */ list = this.paramsMap.get(param) || [];\n list.length = 0;\n list.push(val);\n this.paramsMap.set(param, list);\n };\n // A merge operation\n // For each name-values pair in `searchParams`, perform `set(name, values[0])`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n /**\n * @param {?} searchParams\n * @return {?}\n */\n URLSearchParams.prototype.setAll = /**\n * @param {?} searchParams\n * @return {?}\n */\n function (searchParams) {\n var _this = this;\n searchParams.paramsMap.forEach(function (value, param) {\n var /** @type {?} */ list = _this.paramsMap.get(param) || [];\n list.length = 0;\n list.push(value[0]);\n _this.paramsMap.set(param, list);\n });\n };\n /**\n * @param {?} param\n * @param {?} val\n * @return {?}\n */\n URLSearchParams.prototype.append = /**\n * @param {?} param\n * @param {?} val\n * @return {?}\n */\n function (param, val) {\n if (val === void 0 || val === null)\n return;\n var /** @type {?} */ list = this.paramsMap.get(param) || [];\n list.push(val);\n this.paramsMap.set(param, list);\n };\n // A merge operation\n // For each name-values pair in `searchParams`, perform `append(name, value)`\n // for each value in `values`.\n //\n // E.g: \"a=[1,2], c=[8]\" + \"a=[3,4], b=[7]\" = \"a=[1,2,3,4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n /**\n * @param {?} searchParams\n * @return {?}\n */\n URLSearchParams.prototype.appendAll = /**\n * @param {?} searchParams\n * @return {?}\n */\n function (searchParams) {\n var _this = this;\n searchParams.paramsMap.forEach(function (value, param) {\n var /** @type {?} */ list = _this.paramsMap.get(param) || [];\n for (var /** @type {?} */ i = 0; i < value.length; ++i) {\n list.push(value[i]);\n }\n _this.paramsMap.set(param, list);\n });\n };\n // A merge operation\n // For each name-values pair in `searchParams`, perform `delete(name)`,\n // followed by `set(name, values)`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4,5,6], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n /**\n * @param {?} searchParams\n * @return {?}\n */\n URLSearchParams.prototype.replaceAll = /**\n * @param {?} searchParams\n * @return {?}\n */\n function (searchParams) {\n var _this = this;\n searchParams.paramsMap.forEach(function (value, param) {\n var /** @type {?} */ list = _this.paramsMap.get(param) || [];\n list.length = 0;\n for (var /** @type {?} */ i = 0; i < value.length; ++i) {\n list.push(value[i]);\n }\n _this.paramsMap.set(param, list);\n });\n };\n /**\n * @return {?}\n */\n URLSearchParams.prototype.toString = /**\n * @return {?}\n */\n function () {\n var _this = this;\n var /** @type {?} */ paramsList = [];\n this.paramsMap.forEach(function (values, k) {\n values.forEach(function (v) {\n return paramsList.push(_this.queryEncoder.encodeKey(k) + '=' + _this.queryEncoder.encodeValue(v));\n });\n });\n return paramsList.join('&');\n };\n /**\n * @param {?} param\n * @return {?}\n */\n URLSearchParams.prototype.delete = /**\n * @param {?} param\n * @return {?}\n */\n function (param) { this.paramsMap.delete(param); };\n return URLSearchParams;\n}());\n/**\n * Map-like representation of url search parameters, based on\n * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard,\n * with several extensions for merging URLSearchParams objects:\n * - setAll()\n * - appendAll()\n * - replaceAll()\n *\n * This class accepts an optional second parameter of ${\\@link QueryEncoder},\n * which is used to serialize parameters before making a request. By default,\n * `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`,\n * and then un-encodes certain characters that are allowed to be part of the query\n * according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986.\n *\n * These are the characters that are not encoded: `! $ \\' ( ) * + , ; A 9 - . _ ~ ? /`\n *\n * If the set of allowed query characters is not acceptable for a particular backend,\n * `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams.\n *\n * ```\n * import {URLSearchParams, QueryEncoder} from '\\@angular/http';\n * class MyQueryEncoder extends QueryEncoder {\n * encodeKey(k: string): string {\n * return myEncodingFunction(k);\n * }\n *\n * encodeValue(v: string): string {\n * return myEncodingFunction(v);\n * }\n * }\n *\n * let params = new URLSearchParams('', new MyQueryEncoder());\n * ```\n * @deprecated use \\@angular/common/http instead\n */\nexport { URLSearchParams };\nfunction URLSearchParams_tsickle_Closure_declarations() {\n /** @type {?} */\n URLSearchParams.prototype.paramsMap;\n /** @type {?} */\n URLSearchParams.prototype.rawParams;\n /** @type {?} */\n URLSearchParams.prototype.queryEncoder;\n}\n//# sourceMappingURL=url_search_params.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { stringToArrayBuffer } from './http_utils';\nimport { URLSearchParams } from './url_search_params';\n/**\n * HTTP request body used by both {\\@link Request} and {\\@link Response}\n * https://fetch.spec.whatwg.org/#body\n * @abstract\n */\nvar /**\n * HTTP request body used by both {\\@link Request} and {\\@link Response}\n * https://fetch.spec.whatwg.org/#body\n * @abstract\n */\nBody = /** @class */ (function () {\n function Body() {\n }\n /**\n * Attempts to return body as parsed `JSON` object, or raises an exception.\n */\n /**\n * Attempts to return body as parsed `JSON` object, or raises an exception.\n * @return {?}\n */\n Body.prototype.json = /**\n * Attempts to return body as parsed `JSON` object, or raises an exception.\n * @return {?}\n */\n function () {\n if (typeof this._body === 'string') {\n return JSON.parse(/** @type {?} */ (this._body));\n }\n if (this._body instanceof ArrayBuffer) {\n return JSON.parse(this.text());\n }\n return this._body;\n };\n /**\n * Returns the body as a string, presuming `toString()` can be called on the response body.\n *\n * When decoding an `ArrayBuffer`, the optional `encodingHint` parameter determines how the\n * bytes in the buffer will be interpreted. Valid values are:\n *\n * - `legacy` - incorrectly interpret the bytes as UTF-16 (technically, UCS-2). Only characters\n * in the Basic Multilingual Plane are supported, surrogate pairs are not handled correctly.\n * In addition, the endianness of the 16-bit octet pairs in the `ArrayBuffer` is not taken\n * into consideration. This is the default behavior to avoid breaking apps, but should be\n * considered deprecated.\n *\n * - `iso-8859` - interpret the bytes as ISO-8859 (which can be used for ASCII encoded text).\n */\n /**\n * Returns the body as a string, presuming `toString()` can be called on the response body.\n *\n * When decoding an `ArrayBuffer`, the optional `encodingHint` parameter determines how the\n * bytes in the buffer will be interpreted. Valid values are:\n *\n * - `legacy` - incorrectly interpret the bytes as UTF-16 (technically, UCS-2). Only characters\n * in the Basic Multilingual Plane are supported, surrogate pairs are not handled correctly.\n * In addition, the endianness of the 16-bit octet pairs in the `ArrayBuffer` is not taken\n * into consideration. This is the default behavior to avoid breaking apps, but should be\n * considered deprecated.\n *\n * - `iso-8859` - interpret the bytes as ISO-8859 (which can be used for ASCII encoded text).\n * @param {?=} encodingHint\n * @return {?}\n */\n Body.prototype.text = /**\n * Returns the body as a string, presuming `toString()` can be called on the response body.\n *\n * When decoding an `ArrayBuffer`, the optional `encodingHint` parameter determines how the\n * bytes in the buffer will be interpreted. Valid values are:\n *\n * - `legacy` - incorrectly interpret the bytes as UTF-16 (technically, UCS-2). Only characters\n * in the Basic Multilingual Plane are supported, surrogate pairs are not handled correctly.\n * In addition, the endianness of the 16-bit octet pairs in the `ArrayBuffer` is not taken\n * into consideration. This is the default behavior to avoid breaking apps, but should be\n * considered deprecated.\n *\n * - `iso-8859` - interpret the bytes as ISO-8859 (which can be used for ASCII encoded text).\n * @param {?=} encodingHint\n * @return {?}\n */\n function (encodingHint) {\n if (encodingHint === void 0) { encodingHint = 'legacy'; }\n if (this._body instanceof URLSearchParams) {\n return this._body.toString();\n }\n if (this._body instanceof ArrayBuffer) {\n switch (encodingHint) {\n case 'legacy':\n return String.fromCharCode.apply(null, new Uint16Array(/** @type {?} */ (this._body)));\n case 'iso-8859':\n return String.fromCharCode.apply(null, new Uint8Array(/** @type {?} */ (this._body)));\n default:\n throw new Error(\"Invalid value for encodingHint: \" + encodingHint);\n }\n }\n if (this._body == null) {\n return '';\n }\n if (typeof this._body === 'object') {\n return JSON.stringify(this._body, null, 2);\n }\n return this._body.toString();\n };\n /**\n * Return the body as an ArrayBuffer\n */\n /**\n * Return the body as an ArrayBuffer\n * @return {?}\n */\n Body.prototype.arrayBuffer = /**\n * Return the body as an ArrayBuffer\n * @return {?}\n */\n function () {\n if (this._body instanceof ArrayBuffer) {\n return /** @type {?} */ (this._body);\n }\n return stringToArrayBuffer(this.text());\n };\n /**\n * Returns the request's body as a Blob, assuming that body exists.\n */\n /**\n * Returns the request's body as a Blob, assuming that body exists.\n * @return {?}\n */\n Body.prototype.blob = /**\n * Returns the request's body as a Blob, assuming that body exists.\n * @return {?}\n */\n function () {\n if (this._body instanceof Blob) {\n return /** @type {?} */ (this._body);\n }\n if (this._body instanceof ArrayBuffer) {\n return new Blob([this._body]);\n }\n throw new Error('The request body isn\\'t either a blob or an array buffer');\n };\n return Body;\n}());\n/**\n * HTTP request body used by both {\\@link Request} and {\\@link Response}\n * https://fetch.spec.whatwg.org/#body\n * @abstract\n */\nexport { Body };\nfunction Body_tsickle_Closure_declarations() {\n /**\n * \\@internal\n * @type {?}\n */\n Body.prototype._body;\n}\n//# sourceMappingURL=body.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as tslib_1 from \"tslib\";\nimport { Body } from './body';\n/**\n * Creates `Response` instances from provided values.\n *\n * Though this object isn't\n * usually instantiated by end-users, it is the primary object interacted with when it comes time to\n * add data to a view.\n *\n * ### Example\n *\n * ```\n * http.request('my-friends.txt').subscribe(response => this.friends = response.text());\n * ```\n *\n * The Response's interface is inspired by the Response constructor defined in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body\n * can be accessed many times. There are other differences in the implementation, but this is the\n * most significant.\n *\n * @deprecated use \\@angular/common/http instead\n */\nvar /**\n * Creates `Response` instances from provided values.\n *\n * Though this object isn't\n * usually instantiated by end-users, it is the primary object interacted with when it comes time to\n * add data to a view.\n *\n * ### Example\n *\n * ```\n * http.request('my-friends.txt').subscribe(response => this.friends = response.text());\n * ```\n *\n * The Response's interface is inspired by the Response constructor defined in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body\n * can be accessed many times. There are other differences in the implementation, but this is the\n * most significant.\n *\n * @deprecated use \\@angular/common/http instead\n */\nResponse = /** @class */ (function (_super) {\n tslib_1.__extends(Response, _super);\n function Response(responseOptions) {\n var _this = _super.call(this) || this;\n _this._body = responseOptions.body;\n _this.status = /** @type {?} */ ((responseOptions.status));\n _this.ok = (_this.status >= 200 && _this.status <= 299);\n _this.statusText = responseOptions.statusText;\n _this.headers = responseOptions.headers;\n _this.type = /** @type {?} */ ((responseOptions.type));\n _this.url = /** @type {?} */ ((responseOptions.url));\n return _this;\n }\n /**\n * @return {?}\n */\n Response.prototype.toString = /**\n * @return {?}\n */\n function () {\n return \"Response with status: \" + this.status + \" \" + this.statusText + \" for URL: \" + this.url;\n };\n return Response;\n}(Body));\n/**\n * Creates `Response` instances from provided values.\n *\n * Though this object isn't\n * usually instantiated by end-users, it is the primary object interacted with when it comes time to\n * add data to a view.\n *\n * ### Example\n *\n * ```\n * http.request('my-friends.txt').subscribe(response => this.friends = response.text());\n * ```\n *\n * The Response's interface is inspired by the Response constructor defined in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body\n * can be accessed many times. There are other differences in the implementation, but this is the\n * most significant.\n *\n * @deprecated use \\@angular/common/http instead\n */\nexport { Response };\nfunction Response_tsickle_Closure_declarations() {\n /**\n * One of \"basic\", \"cors\", \"default\", \"error\", or \"opaque\".\n *\n * Defaults to \"default\".\n * @type {?}\n */\n Response.prototype.type;\n /**\n * True if the response's status is within 200-299\n * @type {?}\n */\n Response.prototype.ok;\n /**\n * URL of response.\n *\n * Defaults to empty string.\n * @type {?}\n */\n Response.prototype.url;\n /**\n * Status code returned by server.\n *\n * Defaults to 200.\n * @type {?}\n */\n Response.prototype.status;\n /**\n * Text representing the corresponding reason phrase to the `status`, as defined in [ietf rfc 2616\n * section 6.1.1](https://tools.ietf.org/html/rfc2616#section-6.1.1)\n *\n * Defaults to \"OK\"\n * @type {?}\n */\n Response.prototype.statusText;\n /**\n * Non-standard property\n *\n * Denotes how many of the response body's bytes have been loaded, for example if the response is\n * the result of a progress event.\n * @type {?}\n */\n Response.prototype.bytesLoaded;\n /**\n * Non-standard property\n *\n * Denotes how many bytes are expected in the final response body.\n * @type {?}\n */\n Response.prototype.totalBytes;\n /**\n * Headers object based on the `Headers` class in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#headers-class).\n * @type {?}\n */\n Response.prototype.headers;\n}\n//# sourceMappingURL=static_response.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Injectable } from '@angular/core';\nvar /** @type {?} */ _nextRequestId = 0;\nexport var /** @type {?} */ JSONP_HOME = '__ng_jsonp__';\nvar /** @type {?} */ _jsonpConnections = null;\n/**\n * @return {?}\n */\nfunction _getJsonpConnections() {\n var /** @type {?} */ w = typeof window == 'object' ? window : {};\n if (_jsonpConnections === null) {\n _jsonpConnections = w[JSONP_HOME] = {};\n }\n return _jsonpConnections;\n}\nvar BrowserJsonp = /** @class */ (function () {\n function BrowserJsonp() {\n }\n // Construct a