blob: 3f1c572d712f968ca4096c46856e7fd00235e724 [file] [log] [blame]
{"version":3,"file":"http.umd.js","sources":["../../../../../../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/http/src/backends/browser_xhr.ts","../../../../../packages/http/src/enums.ts","../../../../../packages/http/src/headers.ts","../../../../../packages/http/src/base_response_options.ts","../../../../../packages/http/src/interfaces.ts","../../../../../packages/http/src/http_utils.ts","../../../../../packages/http/src/url_search_params.ts","../../../../../packages/http/src/body.ts","../../../../../packages/http/src/static_response.ts","../../../../../packages/http/src/backends/browser_jsonp.ts","../../../../../packages/http/src/backends/jsonp_backend.ts","../../../../../packages/http/src/backends/xhr_backend.ts","../../../../../packages/http/src/base_request_options.ts","../../../../../packages/http/src/static_request.ts","../../../../../packages/http/src/http.ts","../../../../../packages/http/src/http_module.ts","../../../../../packages/http/src/version.ts","../../../../../packages/http/src/index.ts","../../../../../packages/http/public_api.ts","../../../../../packages/http/index.ts","../../../../../packages/http/http.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\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\nimport {Injectable} from '@angular/core';\n\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 see https://angular.io/guide/http\n * @publicApi\n */\n@Injectable()\nexport class BrowserXhr {\n constructor() {}\n build(): any { return <any>(new XMLHttpRequest()); }\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/**\n * Supported http methods.\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport enum RequestMethod {\n Get,\n Post,\n Put,\n Delete,\n Options,\n Head,\n Patch\n}\n\n/**\n * All possible states in which a connection can be, based on\n * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an\n * additional \"CANCELLED\" state.\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport enum ReadyState {\n Unsent,\n Open,\n HeadersReceived,\n Loading,\n Done,\n Cancelled\n}\n\n/**\n * Acceptable response types to be associated with a {@link Response}, based on\n * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport enum ResponseType {\n Basic,\n Cors,\n Default,\n Error,\n Opaque\n}\n\n/**\n * Supported content type to be automatically associated with a {@link Request}.\n * @deprecated see https://angular.io/guide/http\n */\nexport enum ContentType {\n NONE,\n JSON,\n FORM,\n FORM_DATA,\n TEXT,\n BLOB,\n ARRAY_BUFFER\n}\n\n/**\n * Define which buffer to use to store the response\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport enum ResponseContentType {\n Text,\n Json,\n ArrayBuffer,\n Blob\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/**\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 * @usageNotes\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 see https://angular.io/guide/http\n * @publicApi\n */\nexport class Headers {\n /** @internal header names are lower case */\n _headers: Map<string, string[]> = new Map();\n /** @internal map lower case names to actual names */\n _normalizedNames: Map<string, string> = new Map();\n\n // TODO(vicb): any -> string|string[]\n constructor(headers?: Headers|{[name: string]: any}|null) {\n if (!headers) {\n return;\n }\n\n if (headers instanceof Headers) {\n headers.forEach((values: string[], name: string) => {\n values.forEach(value => this.append(name, value));\n });\n return;\n }\n\n Object.keys(headers).forEach((name: string) => {\n const values: string[] = Array.isArray(headers[name]) ? headers[name] : [headers[name]];\n this.delete(name);\n values.forEach(value => this.append(name, value));\n });\n }\n\n /**\n * Returns a new Headers instance from the given DOMString of Response Headers\n */\n static fromResponseHeaderString(headersString: string): Headers {\n const headers = new Headers();\n\n headersString.split('\\n').forEach(line => {\n const index = line.indexOf(':');\n if (index > 0) {\n const name = line.slice(0, index);\n const value = line.slice(index + 1).trim();\n headers.set(name, value);\n }\n });\n\n return headers;\n }\n\n /**\n * Appends a header to existing list of header values for a given header name.\n */\n append(name: string, value: string): void {\n const values = this.getAll(name);\n\n if (values === null) {\n this.set(name, value);\n } else {\n values.push(value);\n }\n }\n\n /**\n * Deletes all header values for the given name.\n */\n delete (name: string): void {\n const lcName = name.toLowerCase();\n this._normalizedNames.delete(lcName);\n this._headers.delete(lcName);\n }\n\n forEach(fn: (values: string[], name: string|undefined, headers: Map<string, string[]>) => void):\n void {\n this._headers.forEach(\n (values, lcName) => fn(values, this._normalizedNames.get(lcName), this._headers));\n }\n\n /**\n * Returns first header that matches given name.\n */\n get(name: string): string|null {\n const values = this.getAll(name);\n\n if (values === null) {\n return null;\n }\n\n return values.length > 0 ? values[0] : null;\n }\n\n /**\n * Checks for existence of header by given name.\n */\n has(name: string): boolean { return this._headers.has(name.toLowerCase()); }\n\n /**\n * Returns the names of the headers\n */\n keys(): string[] { return Array.from(this._normalizedNames.values()); }\n\n /**\n * Sets or overrides header value for given name.\n */\n set(name: string, value: string|string[]): void {\n if (Array.isArray(value)) {\n if (value.length) {\n this._headers.set(name.toLowerCase(), [value.join(',')]);\n }\n } else {\n this._headers.set(name.toLowerCase(), [value]);\n }\n this.mayBeSetNormalizedName(name);\n }\n\n /**\n * Returns values of all headers.\n */\n values(): string[][] { return Array.from(this._headers.values()); }\n\n /**\n * Returns string of all headers.\n */\n // TODO(vicb): returns {[name: string]: string[]}\n toJSON(): {[name: string]: any} {\n const serialized: {[name: string]: string[]} = {};\n\n this._headers.forEach((values: string[], name: string) => {\n const split: string[] = [];\n values.forEach(v => split.push(...v.split(',')));\n serialized[this._normalizedNames.get(name) !] = split;\n });\n\n return serialized;\n }\n\n /**\n * Returns list of header values for a given name.\n */\n getAll(name: string): string[]|null {\n return this.has(name) ? this._headers.get(name.toLowerCase()) || null : null;\n }\n\n /**\n * This method is not implemented.\n */\n entries() { throw new Error('\"entries\" method is not implemented on Headers class'); }\n\n private mayBeSetNormalizedName(name: string): void {\n const lcName = name.toLowerCase();\n\n if (!this._normalizedNames.has(lcName)) {\n this._normalizedNames.set(lcName, name);\n }\n }\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\nimport {Injectable} from '@angular/core';\n\nimport {ResponseType} from './enums';\nimport {Headers} from './headers';\nimport {ResponseOptionsArgs} from './interfaces';\n\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 * @usageNotes\n * ### Example\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 see https://angular.io/guide/http\n * @publicApi\n */\nexport class ResponseOptions {\n // TODO: FormData | Blob\n /**\n * String, Object, ArrayBuffer or Blob representing the body of the {@link Response}.\n */\n body: string|Object|ArrayBuffer|Blob|null;\n /**\n * Http {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html status code}\n * associated with the response.\n */\n status: number|null;\n /**\n * Response {@link Headers headers}\n */\n headers: Headers|null;\n /**\n * @internal\n */\n statusText: string|null;\n /**\n * @internal\n */\n type: ResponseType|null;\n url: string|null;\n constructor(opts: ResponseOptionsArgs = {}) {\n const {body, status, headers, statusText, type, url} = opts;\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 /**\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 * @usageNotes\n * ### Example\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 merge(options?: ResponseOptionsArgs): ResponseOptions {\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}\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 * @usageNotes\n * ### Example\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\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 see https://angular.io/guide/http\n * @publicApi\n */\n@Injectable()\nexport class BaseResponseOptions extends ResponseOptions {\n constructor() {\n super({status: 200, statusText: 'Ok', type: ResponseType.Default, headers: new Headers()});\n }\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\nimport {ReadyState, RequestMethod, ResponseContentType, ResponseType} from './enums';\nimport {Headers} from './headers';\nimport {Request} from './static_request';\nimport {URLSearchParams} from './url_search_params';\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 see https://angular.io/guide/http\n * @publicApi\n */\nexport abstract class ConnectionBackend { abstract createConnection(request: any): Connection; }\n\n/**\n * Abstract class from which real connections are derived.\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport abstract class Connection {\n // TODO(issue/24571): remove '!'.\n readyState !: ReadyState;\n // TODO(issue/24571): remove '!'.\n request !: Request;\n response: any; // TODO: generic of <Response>;\n}\n\n/**\n * An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport abstract class XSRFStrategy { abstract configureRequest(req: Request): void; }\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 see https://angular.io/guide/http\n * @publicApi\n */\nexport interface RequestOptionsArgs {\n url?: string|null;\n method?: string|RequestMethod|null;\n /** @deprecated from 4.0.0. Use params instead. */\n search?: string|URLSearchParams|{[key: string]: any | any[]}|null;\n params?: string|URLSearchParams|{[key: string]: any | any[]}|null;\n headers?: Headers|null;\n body?: any;\n withCredentials?: boolean|null;\n responseType?: ResponseContentType|null;\n}\n\n/**\n * Required structure when constructing new Request();\n */\nexport interface RequestArgs extends RequestOptionsArgs { url: string|null; }\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 see https://angular.io/guide/http\n * @publicApi\n */\nexport interface ResponseOptionsArgs {\n body?: string|Object|FormData|ArrayBuffer|Blob|null;\n status?: number|null;\n statusText?: string|null;\n headers?: Headers|null;\n type?: ResponseType|null;\n url?: string|null;\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\nimport {RequestMethod} from './enums';\n\nexport function normalizeMethodName(method: string | RequestMethod): RequestMethod {\n if (typeof method !== 'string') return method;\n\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}\n\nexport const isSuccess = (status: number): boolean => (status >= 200 && status < 300);\n\nexport function getResponseURL(xhr: any): string|null {\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\nexport function stringToArrayBuffer8(input: String): ArrayBuffer {\n const view = new Uint8Array(input.length);\n for (let i = 0, strLen = input.length; i < strLen; i++) {\n view[i] = input.charCodeAt(i);\n }\n return view.buffer;\n}\n\n\nexport function stringToArrayBuffer(input: String): ArrayBuffer {\n const view = new Uint16Array(input.length);\n for (let i = 0, strLen = input.length; i < strLen; i++) {\n view[i] = input.charCodeAt(i);\n }\n return view.buffer;\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\nfunction paramParser(rawParams: string = ''): Map<string, string[]> {\n const map = new Map<string, string[]>();\n if (rawParams.length > 0) {\n const params: string[] = rawParams.split('&');\n params.forEach((param: string) => {\n const eqIdx = param.indexOf('=');\n const [key, val]: string[] =\n eqIdx == -1 ? [param, ''] : [param.slice(0, eqIdx), param.slice(eqIdx + 1)];\n const list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n/**\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n **/\nexport class QueryEncoder {\n encodeKey(key: string): string { return standardEncoding(key); }\n\n encodeValue(value: string): string { return standardEncoding(value); }\n}\n\nfunction standardEncoding(v: string): string {\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/**\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 see https://angular.io/guide/http\n * @publicApi\n */\nexport class URLSearchParams {\n paramsMap: Map<string, string[]>;\n constructor(\n public rawParams: string = '', private queryEncoder: QueryEncoder = new QueryEncoder()) {\n this.paramsMap = paramParser(rawParams);\n }\n\n clone(): URLSearchParams {\n const clone = new URLSearchParams('', this.queryEncoder);\n clone.appendAll(this);\n return clone;\n }\n\n has(param: string): boolean { return this.paramsMap.has(param); }\n\n get(param: string): string|null {\n const storedParam = this.paramsMap.get(param);\n\n return Array.isArray(storedParam) ? storedParam[0] : null;\n }\n\n getAll(param: string): string[] { return this.paramsMap.get(param) || []; }\n\n set(param: string, val: string) {\n if (val === void 0 || val === null) {\n this.delete(param);\n return;\n }\n const list = this.paramsMap.get(param) || [];\n list.length = 0;\n list.push(val);\n this.paramsMap.set(param, list);\n }\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 setAll(searchParams: URLSearchParams) {\n searchParams.paramsMap.forEach((value, param) => {\n const list = this.paramsMap.get(param) || [];\n list.length = 0;\n list.push(value[0]);\n this.paramsMap.set(param, list);\n });\n }\n\n append(param: string, val: string): void {\n if (val === void 0 || val === null) return;\n const list = this.paramsMap.get(param) || [];\n list.push(val);\n this.paramsMap.set(param, list);\n }\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 appendAll(searchParams: URLSearchParams) {\n searchParams.paramsMap.forEach((value, param) => {\n const list = this.paramsMap.get(param) || [];\n for (let i = 0; i < value.length; ++i) {\n list.push(value[i]);\n }\n this.paramsMap.set(param, list);\n });\n }\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 replaceAll(searchParams: URLSearchParams) {\n searchParams.paramsMap.forEach((value, param) => {\n const list = this.paramsMap.get(param) || [];\n list.length = 0;\n for (let i = 0; i < value.length; ++i) {\n list.push(value[i]);\n }\n this.paramsMap.set(param, list);\n });\n }\n\n toString(): string {\n const paramsList: string[] = [];\n this.paramsMap.forEach((values, k) => {\n values.forEach(\n v => paramsList.push(\n this.queryEncoder.encodeKey(k) + '=' + this.queryEncoder.encodeValue(v)));\n });\n return paramsList.join('&');\n }\n\n delete (param: string): void { this.paramsMap.delete(param); }\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\nimport {stringToArrayBuffer} from './http_utils';\nimport {URLSearchParams} from './url_search_params';\n\n\n/**\n * HTTP request body used by both {@link Request} and {@link Response}\n * https://fetch.spec.whatwg.org/#body\n */\nexport abstract class Body {\n /**\n * @internal\n */\n protected _body: any;\n\n /**\n * Attempts to return body as parsed `JSON` object, or raises an exception.\n */\n json(): any {\n if (typeof this._body === 'string') {\n return JSON.parse(<string>this._body);\n }\n\n if (this._body instanceof ArrayBuffer) {\n return JSON.parse(this.text());\n }\n\n return this._body;\n }\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 text(encodingHint: 'legacy'|'iso-8859' = 'legacy'): string {\n if (this._body instanceof URLSearchParams) {\n return this._body.toString();\n }\n\n if (this._body instanceof ArrayBuffer) {\n switch (encodingHint) {\n case 'legacy':\n return String.fromCharCode.apply(null, new Uint16Array(this._body as ArrayBuffer));\n case 'iso-8859':\n return String.fromCharCode.apply(null, new Uint8Array(this._body as ArrayBuffer));\n default:\n throw new Error(`Invalid value for encodingHint: ${encodingHint}`);\n }\n }\n\n if (this._body == null) {\n return '';\n }\n\n if (typeof this._body === 'object') {\n return JSON.stringify(this._body, null, 2);\n }\n\n return this._body.toString();\n }\n\n /**\n * Return the body as an ArrayBuffer\n */\n arrayBuffer(): ArrayBuffer {\n if (this._body instanceof ArrayBuffer) {\n return <ArrayBuffer>this._body;\n }\n\n return stringToArrayBuffer(this.text());\n }\n\n /**\n * Returns the request's body as a Blob, assuming that body exists.\n */\n blob(): Blob {\n if (this._body instanceof Blob) {\n return <Blob>this._body;\n }\n\n if (this._body instanceof ArrayBuffer) {\n return new Blob([this._body]);\n }\n\n throw new Error('The request body isn\\'t either a blob or an array buffer');\n }\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\n\nimport {ResponseOptions} from './base_response_options';\nimport {Body} from './body';\nimport {ResponseType} from './enums';\nimport {Headers} from './headers';\n\n\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 * @usageNotes\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 see https://angular.io/guide/http\n * @publicApi\n */\nexport class Response extends Body {\n /**\n * One of \"basic\", \"cors\", \"default\", \"error\", or \"opaque\".\n *\n * Defaults to \"default\".\n */\n type: ResponseType;\n /**\n * True if the response's status is within 200-299\n */\n ok: boolean;\n /**\n * URL of response.\n *\n * Defaults to empty string.\n */\n url: string;\n /**\n * Status code returned by server.\n *\n * Defaults to 200.\n */\n status: number;\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 */\n statusText: string|null;\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 */\n // TODO(issue/24571): remove '!'.\n bytesLoaded !: number;\n /**\n * Non-standard property\n *\n * Denotes how many bytes are expected in the final response body.\n */\n // TODO(issue/24571): remove '!'.\n totalBytes !: number;\n /**\n * Headers object based on the `Headers` class in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#headers-class).\n */\n headers: Headers|null;\n\n constructor(responseOptions: ResponseOptions) {\n super();\n this._body = responseOptions.body;\n this.status = responseOptions.status !;\n this.ok = (this.status >= 200 && this.status <= 299);\n this.statusText = responseOptions.statusText;\n this.headers = responseOptions.headers;\n this.type = responseOptions.type !;\n this.url = responseOptions.url !;\n }\n\n toString(): string {\n return `Response with status: ${this.status} ${this.statusText} for URL: ${this.url}`;\n }\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\nimport {Injectable} from '@angular/core';\n\nlet _nextRequestId = 0;\nexport const JSONP_HOME = '__ng_jsonp__';\nlet _jsonpConnections: {[key: string]: any}|null = null;\n\nfunction _getJsonpConnections(): {[key: string]: any} {\n const w: {[key: string]: any} = typeof window == 'object' ? window : {};\n if (_jsonpConnections === null) {\n _jsonpConnections = w[JSONP_HOME] = {};\n }\n return _jsonpConnections;\n}\n\n// Make sure not to evaluate this in a non-browser environment!\n@Injectable()\nexport class BrowserJsonp {\n // Construct a <script> element with the specified URL\n build(url: string): any {\n const node = document.createElement('script');\n node.src = url;\n return node;\n }\n\n nextRequestID(): string { return `__req${_nextRequestId++}`; }\n\n requestCallback(id: string): string { return `${JSONP_HOME}.${id}.finished`; }\n\n exposeConnection(id: string, connection: any) {\n const connections = _getJsonpConnections();\n connections[id] = connection;\n }\n\n removeConnection(id: string) {\n const connections = _getJsonpConnections();\n connections[id] = null;\n }\n\n // Attach the <script> element to the DOM\n send(node: any) { document.body.appendChild(<Node>(node)); }\n\n // Remove <script> element from the DOM\n cleanup(node: any) {\n if (node.parentNode) {\n node.parentNode.removeChild(<Node>(node));\n }\n }\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\nimport {Injectable} from '@angular/core';\nimport {Observable, Observer} from 'rxjs';\n\nimport {ResponseOptions} from '../base_response_options';\nimport {ReadyState, RequestMethod, ResponseType} from '../enums';\nimport {Connection, ConnectionBackend} from '../interfaces';\nimport {Request} from '../static_request';\nimport {Response} from '../static_response';\n\nimport {BrowserJsonp} from './browser_jsonp';\n\nconst JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\nconst JSONP_ERR_WRONG_METHOD = 'JSONP requests must use GET request method.';\n\n/**\n * Base class for an in-flight JSONP request.\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport class JSONPConnection implements Connection {\n // TODO(issue/24571): remove '!'.\n private _id !: string;\n // TODO(issue/24571): remove '!'.\n private _script !: Element;\n private _responseData: any;\n private _finished: boolean = false;\n\n /**\n * The {@link ReadyState} of this request.\n */\n // TODO(issue/24571): remove '!'.\n readyState !: ReadyState;\n\n /**\n * The outgoing HTTP request.\n */\n request: Request;\n\n /**\n * An observable that completes with the response, when the request is finished.\n */\n response: Observable<Response>;\n\n /** @internal */\n constructor(\n req: Request, private _dom: BrowserJsonp, private baseResponseOptions?: ResponseOptions) {\n if (req.method !== RequestMethod.Get) {\n throw new TypeError(JSONP_ERR_WRONG_METHOD);\n }\n this.request = req;\n this.response = new Observable<Response>((responseObserver: Observer<Response>) => {\n\n this.readyState = ReadyState.Loading;\n const id = this._id = _dom.nextRequestID();\n\n _dom.exposeConnection(id, this);\n\n // Workaround Dart\n // url = url.replace(/=JSONP_CALLBACK(&|$)/, `generated method`);\n const callback = _dom.requestCallback(this._id);\n let url: string = req.url;\n if (url.indexOf('=JSONP_CALLBACK&') > -1) {\n url = url.replace('=JSONP_CALLBACK&', `=${callback}&`);\n } else if (url.lastIndexOf('=JSONP_CALLBACK') === url.length - '=JSONP_CALLBACK'.length) {\n url = url.substring(0, url.length - '=JSONP_CALLBACK'.length) + `=${callback}`;\n }\n\n const script = this._script = _dom.build(url);\n\n const onLoad = (event: Event) => {\n if (this.readyState === ReadyState.Cancelled) return;\n this.readyState = ReadyState.Done;\n _dom.cleanup(script);\n if (!this._finished) {\n let responseOptions =\n new ResponseOptions({body: JSONP_ERR_NO_CALLBACK, type: ResponseType.Error, url});\n if (baseResponseOptions) {\n responseOptions = baseResponseOptions.merge(responseOptions);\n }\n responseObserver.error(new Response(responseOptions));\n return;\n }\n\n let responseOptions = new ResponseOptions({body: this._responseData, url});\n if (this.baseResponseOptions) {\n responseOptions = this.baseResponseOptions.merge(responseOptions);\n }\n\n responseObserver.next(new Response(responseOptions));\n responseObserver.complete();\n };\n\n const onError = (error: Error) => {\n if (this.readyState === ReadyState.Cancelled) return;\n this.readyState = ReadyState.Done;\n _dom.cleanup(script);\n let responseOptions = new ResponseOptions({body: error.message, type: ResponseType.Error});\n if (baseResponseOptions) {\n responseOptions = baseResponseOptions.merge(responseOptions);\n }\n responseObserver.error(new Response(responseOptions));\n };\n\n script.addEventListener('load', onLoad);\n script.addEventListener('error', onError);\n\n _dom.send(script);\n\n return () => {\n this.readyState = ReadyState.Cancelled;\n script.removeEventListener('load', onLoad);\n script.removeEventListener('error', onError);\n this._dom.cleanup(script);\n };\n });\n }\n\n /**\n * Callback called when the JSONP request completes, to notify the application\n * of the new data.\n */\n finished(data?: any) {\n // Don't leak connections\n this._finished = true;\n this._dom.removeConnection(this._id);\n if (this.readyState === ReadyState.Cancelled) return;\n this._responseData = data;\n }\n}\n\n/**\n * A {@link ConnectionBackend} that uses the JSONP strategy of making requests.\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\n@Injectable()\nexport class JSONPBackend extends ConnectionBackend {\n /** @internal */\n constructor(private _browserJSONP: BrowserJsonp, private _baseResponseOptions: ResponseOptions) {\n super();\n }\n\n createConnection(request: Request): JSONPConnection {\n return new JSONPConnection(request, this._browserJSONP, this._baseResponseOptions);\n }\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\nimport {Injectable} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {Observable, Observer} from 'rxjs';\nimport {ResponseOptions} from '../base_response_options';\nimport {ContentType, ReadyState, RequestMethod, ResponseContentType, ResponseType} from '../enums';\nimport {Headers} from '../headers';\nimport {getResponseURL, isSuccess} from '../http_utils';\nimport {Connection, ConnectionBackend, XSRFStrategy} from '../interfaces';\nimport {Request} from '../static_request';\nimport {Response} from '../static_response';\nimport {BrowserXhr} from './browser_xhr';\n\nconst XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n\n/**\n * Creates connections using `XMLHttpRequest`. Given a fully-qualified\n * request, an `XHRConnection` will immediately create an `XMLHttpRequest` object and send the\n * request.\n *\n * This class would typically not be created or interacted with directly inside applications, though\n * the {@link MockConnection} may be interacted with in tests.\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport class XHRConnection implements Connection {\n request: Request;\n /**\n * Response {@link EventEmitter} which emits a single {@link Response} value on load event of\n * `XMLHttpRequest`.\n */\n response: Observable<Response>;\n // TODO(issue/24571): remove '!'.\n readyState !: ReadyState;\n constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions) {\n this.request = req;\n this.response = new Observable<Response>((responseObserver: Observer<Response>) => {\n const _xhr: XMLHttpRequest = browserXHR.build();\n _xhr.open(RequestMethod[req.method].toUpperCase(), req.url);\n if (req.withCredentials != null) {\n _xhr.withCredentials = req.withCredentials;\n }\n // load event handler\n const onLoad = () => {\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n let status: number = _xhr.status === 1223 ? 204 : _xhr.status;\n\n let body: any = null;\n\n // HTTP 204 means no content\n if (status !== 204) {\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in ResourceLoader Level2 spec\n // (supported by IE10)\n body = (typeof _xhr.response === 'undefined') ? _xhr.responseText : _xhr.response;\n\n // Implicitly strip a potential XSSI prefix.\n if (typeof body === 'string') {\n body = body.replace(XSSI_PREFIX, '');\n }\n }\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = body ? 200 : 0;\n }\n\n const headers: Headers = Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders());\n // IE 9 does not provide the way to get URL of response\n const url = getResponseURL(_xhr) || req.url;\n const statusText: string = _xhr.statusText || 'OK';\n\n let responseOptions = new ResponseOptions({body, status, headers, statusText, url});\n if (baseResponseOptions != null) {\n responseOptions = baseResponseOptions.merge(responseOptions);\n }\n const response = new Response(responseOptions);\n response.ok = isSuccess(status);\n if (response.ok) {\n responseObserver.next(response);\n // TODO(gdi2290): defer complete if array buffer until done\n responseObserver.complete();\n return;\n }\n responseObserver.error(response);\n };\n // error event handler\n const onError = (err: ErrorEvent) => {\n let responseOptions = new ResponseOptions({\n body: err,\n type: ResponseType.Error,\n status: _xhr.status,\n statusText: _xhr.statusText,\n });\n if (baseResponseOptions != null) {\n responseOptions = baseResponseOptions.merge(responseOptions);\n }\n responseObserver.error(new Response(responseOptions));\n };\n\n this.setDetectedContentType(req, _xhr);\n\n if (req.headers == null) {\n req.headers = new Headers();\n }\n if (!req.headers.has('Accept')) {\n req.headers.append('Accept', 'application/json, text/plain, */*');\n }\n req.headers.forEach((values, name) => _xhr.setRequestHeader(name !, values.join(',')));\n\n // Select the correct buffer type to store the response\n if (req.responseType != null && _xhr.responseType != null) {\n switch (req.responseType) {\n case ResponseContentType.ArrayBuffer:\n _xhr.responseType = 'arraybuffer';\n break;\n case ResponseContentType.Json:\n _xhr.responseType = 'json';\n break;\n case ResponseContentType.Text:\n _xhr.responseType = 'text';\n break;\n case ResponseContentType.Blob:\n _xhr.responseType = 'blob';\n break;\n default:\n throw new Error('The selected responseType is not supported');\n }\n }\n\n _xhr.addEventListener('load', onLoad);\n _xhr.addEventListener('error', onError);\n\n _xhr.send(this.request.getBody());\n\n return () => {\n _xhr.removeEventListener('load', onLoad);\n _xhr.removeEventListener('error', onError);\n _xhr.abort();\n };\n });\n }\n\n setDetectedContentType(req: any /** TODO Request */, _xhr: any /** XMLHttpRequest */) {\n // Skip if a custom Content-Type header is provided\n if (req.headers != null && req.headers.get('Content-Type') != null) {\n return;\n }\n\n // Set the detected content type\n switch (req.contentType) {\n case ContentType.NONE:\n break;\n case ContentType.JSON:\n _xhr.setRequestHeader('content-type', 'application/json');\n break;\n case ContentType.FORM:\n _xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n break;\n case ContentType.TEXT:\n _xhr.setRequestHeader('content-type', 'text/plain');\n break;\n case ContentType.BLOB:\n const blob = req.blob();\n if (blob.type) {\n _xhr.setRequestHeader('content-type', blob.type);\n }\n break;\n }\n }\n}\n\n/**\n * `XSRFConfiguration` sets up Cross Site Request Forgery (XSRF) protection for the application\n * using a cookie. See https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)\n * for more information on XSRF.\n *\n * Applications can configure custom cookie and header names by binding an instance of this class\n * with different `cookieName` and `headerName` values. See the main HTTP documentation for more\n * details.\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport class CookieXSRFStrategy implements XSRFStrategy {\n constructor(\n private _cookieName: string = 'XSRF-TOKEN', private _headerName: string = 'X-XSRF-TOKEN') {}\n\n configureRequest(req: Request): void {\n const xsrfToken = getDOM().getCookie(this._cookieName);\n if (xsrfToken) {\n req.headers.set(this._headerName, xsrfToken);\n }\n }\n}\n\n/**\n * Creates {@link XHRConnection} instances.\n *\n * This class would typically not be used by end users, but could be\n * overridden if a different backend implementation should be used,\n * such as in a node backend.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequestOptions} from '@angular/http';\n * @Component({\n * viewProviders: [\n * HTTP_PROVIDERS,\n * {provide: Http, useFactory: (backend, options) => {\n * return new Http(backend, options);\n * }, deps: [MyNodeBackend, BaseRequestOptions]}]\n * })\n * class MyComponent {\n * constructor(http:Http) {\n * http.request('people.json').subscribe(res => this.people = res.json());\n * }\n * }\n * ```\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\n@Injectable()\nexport class XHRBackend implements ConnectionBackend {\n constructor(\n private _browserXHR: BrowserXhr, private _baseResponseOptions: ResponseOptions,\n private _xsrfStrategy: XSRFStrategy) {}\n\n createConnection(request: Request): XHRConnection {\n this._xsrfStrategy.configureRequest(request);\n return new XHRConnection(request, this._browserXHR, this._baseResponseOptions);\n }\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\nimport {Injectable} from '@angular/core';\n\nimport {RequestMethod, ResponseContentType} from './enums';\nimport {Headers} from './headers';\nimport {normalizeMethodName} from './http_utils';\nimport {RequestOptionsArgs} from './interfaces';\nimport {URLSearchParams} from './url_search_params';\n\n\n/**\n * Creates a request options object to be optionally provided when instantiating a\n * {@link Request}.\n *\n * This class is based on the `RequestInit` description in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#requestinit).\n *\n * All values are null by default. Typical defaults can be found in the {@link BaseRequestOptions}\n * class, which sub-classes `RequestOptions`.\n *\n * ```typescript\n * import {RequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new RequestOptions({\n * method: RequestMethod.Post,\n * url: 'https://google.com'\n * });\n * const req = new Request(options);\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // https://google.com\n * ```\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport class RequestOptions {\n /**\n * Http method with which to execute a {@link Request}.\n * Acceptable methods are defined in the {@link RequestMethod} enum.\n */\n method: RequestMethod|string|null;\n /**\n * {@link Headers} to be attached to a {@link Request}.\n */\n headers: Headers|null;\n /**\n * Body to be used when creating a {@link Request}.\n */\n body: any;\n /**\n * Url with which to perform a {@link Request}.\n */\n url: string|null;\n /**\n * Search parameters to be included in a {@link Request}.\n */\n params: URLSearchParams;\n /**\n * @deprecated from 4.0.0. Use params instead.\n */\n get search(): URLSearchParams { return this.params; }\n /**\n * @deprecated from 4.0.0. Use params instead.\n */\n set search(params: URLSearchParams) { this.params = params; }\n /**\n * Enable use credentials for a {@link Request}.\n */\n withCredentials: boolean|null;\n /*\n * Select a buffer to store the response, such as ArrayBuffer, Blob, Json (or Document)\n */\n responseType: ResponseContentType|null;\n\n // TODO(Dzmitry): remove search when this.search is removed\n constructor(opts: RequestOptionsArgs = {}) {\n const {method, headers, body, url, search, params, withCredentials, responseType} = opts;\n this.method = method != null ? normalizeMethodName(method) : null;\n this.headers = headers != null ? headers : null;\n this.body = body != null ? body : null;\n this.url = url != null ? url : null;\n this.params = this._mergeSearchParams(params || search);\n this.withCredentials = withCredentials != null ? withCredentials : null;\n this.responseType = responseType != null ? responseType : null;\n }\n\n /**\n * Creates a copy of the `RequestOptions` instance, using the optional input as values to override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * Note that `headers` and `search` will override existing values completely if present in\n * the `options` object. If these values should be merged, it should be done prior to calling\n * `merge` on the `RequestOptions` instance.\n *\n * ```typescript\n * import {RequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new RequestOptions({\n * method: RequestMethod.Post\n * });\n * const req = new Request(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // null\n * console.log('req.url:', req.url); // https://google.com\n * ```\n */\n merge(options?: RequestOptionsArgs): RequestOptions {\n return new RequestOptions({\n method: options && options.method != null ? options.method : this.method,\n headers: options && options.headers != null ? options.headers : new Headers(this.headers),\n body: options && options.body != null ? options.body : this.body,\n url: options && options.url != null ? options.url : this.url,\n params: options && this._mergeSearchParams(options.params || options.search),\n withCredentials: options && options.withCredentials != null ? options.withCredentials :\n this.withCredentials,\n responseType: options && options.responseType != null ? options.responseType :\n this.responseType\n });\n }\n\n private _mergeSearchParams(params?: string|URLSearchParams|{[key: string]: any | any[]}|\n null): URLSearchParams {\n if (!params) return this.params;\n\n if (params instanceof URLSearchParams) {\n return params.clone();\n }\n\n if (typeof params === 'string') {\n return new URLSearchParams(params);\n }\n\n return this._parseParams(params);\n }\n\n private _parseParams(objParams: {[key: string]: any | any[]} = {}): URLSearchParams {\n const params = new URLSearchParams();\n Object.keys(objParams).forEach((key: string) => {\n const value: any|any[] = objParams[key];\n if (Array.isArray(value)) {\n value.forEach((item: any) => this._appendParam(key, item, params));\n } else {\n this._appendParam(key, value, params);\n }\n });\n return params;\n }\n\n private _appendParam(key: string, value: any, params: URLSearchParams): void {\n if (typeof value !== 'string') {\n value = JSON.stringify(value);\n }\n params.append(key, value);\n }\n}\n\n/**\n * Subclass of {@link RequestOptions}, with default values.\n *\n * Default values:\n * * method: {@link RequestMethod RequestMethod.Get}\n * * headers: empty {@link Headers} object\n *\n * This class could be extended and bound to the {@link RequestOptions} class\n * when configuring an {@link Injector}, in order to override the default options\n * used by {@link Http} to create and send {@link Request Requests}.\n *\n * ```typescript\n * import {BaseRequestOptions, RequestOptions} from '@angular/http';\n *\n * class MyOptions extends BaseRequestOptions {\n * search: string = 'coreTeam=true';\n * }\n *\n * {provide: RequestOptions, useClass: MyOptions};\n * ```\n *\n * The options could also be extended when manually creating a {@link Request}\n * object.\n *\n * ```\n * import {BaseRequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new BaseRequestOptions();\n * const req = new Request(options.merge({\n * method: RequestMethod.Post,\n * url: 'https://google.com'\n * }));\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // null\n * console.log('req.url:', req.url); // https://google.com\n * ```\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\n@Injectable()\nexport class BaseRequestOptions extends RequestOptions {\n constructor() { super({method: RequestMethod.Get, headers: new Headers()}); }\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\nimport {Body} from './body';\nimport {ContentType, RequestMethod, ResponseContentType} from './enums';\nimport {Headers} from './headers';\nimport {normalizeMethodName} from './http_utils';\nimport {RequestArgs} from './interfaces';\nimport {URLSearchParams} from './url_search_params';\n\n\n// TODO(jeffbcross): properly implement body accessors\n/**\n * Creates `Request` instances from provided values.\n *\n * The Request's interface is inspired by the Request constructor defined in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#request-class),\n * but is considered a static value whose body can be accessed many times. There are other\n * differences in the implementation, but this is the most significant.\n *\n * `Request` instances are typically created by higher-level classes, like {@link Http} and\n * {@link Jsonp}, but it may occasionally be useful to explicitly create `Request` instances.\n * One such example is when creating services that wrap higher-level services, like {@link Http},\n * where it may be useful to generate a `Request` with arbitrary headers and search params.\n *\n * ```typescript\n * import {Injectable, Injector} from '@angular/core';\n * import {HTTP_PROVIDERS, Http, Request, RequestMethod} from '@angular/http';\n *\n * @Injectable()\n * class AutoAuthenticator {\n * constructor(public http:Http) {}\n * request(url:string) {\n * return this.http.request(new Request({\n * method: RequestMethod.Get,\n * url: url,\n * search: 'password=123'\n * }));\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([HTTP_PROVIDERS, AutoAuthenticator]);\n * var authenticator = injector.get(AutoAuthenticator);\n * authenticator.request('people.json').subscribe(res => {\n * //URL should have included '?password=123'\n * console.log('people', res.json());\n * });\n * ```\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport class Request extends Body {\n /**\n * Http method with which to perform the request.\n */\n method: RequestMethod;\n /**\n * {@link Headers} instance\n */\n headers: Headers;\n /** Url of the remote resource */\n url: string;\n /** Type of the request body **/\n private contentType: ContentType;\n /** Enable use credentials */\n withCredentials: boolean;\n /** Buffer to store the response */\n responseType: ResponseContentType;\n constructor(requestOptions: RequestArgs) {\n super();\n // TODO: assert that url is present\n const url = requestOptions.url;\n this.url = requestOptions.url !;\n const paramsArg = requestOptions.params || requestOptions.search;\n if (paramsArg) {\n let params: string;\n if (typeof paramsArg === 'object' && !(paramsArg instanceof URLSearchParams)) {\n params = urlEncodeParams(paramsArg).toString();\n } else {\n params = paramsArg.toString();\n }\n if (params.length > 0) {\n let prefix = '?';\n if (this.url.indexOf('?') != -1) {\n prefix = (this.url[this.url.length - 1] == '&') ? '' : '&';\n }\n // TODO: just delete search-query-looking string in url?\n this.url = url + prefix + params;\n }\n }\n this._body = requestOptions.body;\n this.method = normalizeMethodName(requestOptions.method !);\n // TODO(jeffbcross): implement behavior\n // Defaults to 'omit', consistent with browser\n this.headers = new Headers(requestOptions.headers);\n this.contentType = this.detectContentType();\n this.withCredentials = requestOptions.withCredentials !;\n this.responseType = requestOptions.responseType !;\n }\n\n /**\n * Returns the content type enum based on header options.\n */\n detectContentType(): ContentType {\n switch (this.headers.get('content-type')) {\n case 'application/json':\n return ContentType.JSON;\n case 'application/x-www-form-urlencoded':\n return ContentType.FORM;\n case 'multipart/form-data':\n return ContentType.FORM_DATA;\n case 'text/plain':\n case 'text/html':\n return ContentType.TEXT;\n case 'application/octet-stream':\n return this._body instanceof ArrayBuffer ? ContentType.ARRAY_BUFFER : ContentType.BLOB;\n default:\n return this.detectContentTypeFromBody();\n }\n }\n\n /**\n * Returns the content type of request's body based on its type.\n */\n detectContentTypeFromBody(): ContentType {\n if (this._body == null) {\n return ContentType.NONE;\n } else if (this._body instanceof URLSearchParams) {\n return ContentType.FORM;\n } else if (this._body instanceof FormData) {\n return ContentType.FORM_DATA;\n } else if (this._body instanceof Blob) {\n return ContentType.BLOB;\n } else if (this._body instanceof ArrayBuffer) {\n return ContentType.ARRAY_BUFFER;\n } else if (this._body && typeof this._body === 'object') {\n return ContentType.JSON;\n } else {\n return ContentType.TEXT;\n }\n }\n\n /**\n * Returns the request's body according to its type. If body is undefined, return\n * null.\n */\n getBody(): any {\n switch (this.contentType) {\n case ContentType.JSON:\n return this.text();\n case ContentType.FORM:\n return this.text();\n case ContentType.FORM_DATA:\n return this._body;\n case ContentType.TEXT:\n return this.text();\n case ContentType.BLOB:\n return this.blob();\n case ContentType.ARRAY_BUFFER:\n return this.arrayBuffer();\n default:\n return null;\n }\n }\n}\n\nfunction urlEncodeParams(params: {[key: string]: any}): URLSearchParams {\n const searchParams = new URLSearchParams();\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (value && Array.isArray(value)) {\n value.forEach(element => searchParams.append(key, element.toString()));\n } else {\n searchParams.append(key, value.toString());\n }\n });\n return searchParams;\n}\n\nconst noop = function() {};\nconst w = typeof window == 'object' ? window : noop;\nconst FormData = (w as any /** TODO #9100 */)['FormData'] || noop;\nconst Blob = (w as any /** TODO #9100 */)['Blob'] || noop;\nexport const ArrayBuffer: ArrayBufferConstructor =\n (w as any /** TODO #9100 */)['ArrayBuffer'] || noop;\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\nimport {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {BaseRequestOptions, RequestOptions} from './base_request_options';\nimport {RequestMethod} from './enums';\nimport {ConnectionBackend, RequestArgs, RequestOptionsArgs} from './interfaces';\nimport {Request} from './static_request';\nimport {Response} from './static_response';\n\nfunction httpRequest(backend: ConnectionBackend, request: Request): Observable<Response> {\n return backend.createConnection(request).response;\n}\n\nfunction mergeOptions(\n defaultOpts: BaseRequestOptions, providedOpts: RequestOptionsArgs | undefined,\n method: RequestMethod, url: string): RequestArgs {\n const newOptions = defaultOpts;\n if (providedOpts) {\n // Hack so Dart can used named parameters\n return newOptions.merge(new RequestOptions({\n method: providedOpts.method || method,\n url: providedOpts.url || url,\n search: providedOpts.search,\n params: providedOpts.params,\n headers: providedOpts.headers,\n body: providedOpts.body,\n withCredentials: providedOpts.withCredentials,\n responseType: providedOpts.responseType\n })) as RequestArgs;\n }\n\n return newOptions.merge(new RequestOptions({method, url})) as RequestArgs;\n}\n\n/**\n * Performs http requests using `XMLHttpRequest` as the default backend.\n *\n * `Http` is available as an injectable class, with methods to perform http requests. Calling\n * `request` returns an `Observable` which will emit a single {@link Response} when a\n * response is received.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import {Http, HTTP_PROVIDERS} from '@angular/http';\n * import {map} from 'rxjs/operators';\n *\n * @Component({\n * selector: 'http-app',\n * viewProviders: [HTTP_PROVIDERS],\n * templateUrl: 'people.html'\n * })\n * class PeopleComponent {\n * constructor(http: Http) {\n * http.get('people.json')\n * // Call map on the response observable to get the parsed people object\n * .pipe(map(res => res.json()))\n * // Subscribe to the observable to get the parsed people object and attach it to the\n * // component\n * .subscribe(people => this.people = people);\n * }\n * }\n * ```\n *\n *\n * ### Example\n *\n * ```\n * http.get('people.json').subscribe((res:Response) => this.people = res.json());\n * ```\n *\n * The default construct used to perform requests, `XMLHttpRequest`, is abstracted as a \"Backend\" (\n * {@link XHRBackend} in this case), which could be mocked with dependency injection by replacing\n * the {@link XHRBackend} provider, as in the following example:\n *\n * ### Example\n *\n * ```typescript\n * import {BaseRequestOptions, Http} from '@angular/http';\n * import {MockBackend} from '@angular/http/testing';\n * var injector = Injector.resolveAndCreate([\n * BaseRequestOptions,\n * MockBackend,\n * {provide: Http, useFactory:\n * function(backend, defaultOptions) {\n * return new Http(backend, defaultOptions);\n * },\n * deps: [MockBackend, BaseRequestOptions]}\n * ]);\n * var http = injector.get(Http);\n * http.get('request-from-mock-backend.json').subscribe((res:Response) => doSomething(res));\n * ```\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\n@Injectable()\nexport class Http {\n constructor(protected _backend: ConnectionBackend, protected _defaultOptions: RequestOptions) {}\n\n /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n */\n request(url: string|Request, options?: RequestOptionsArgs): Observable<Response> {\n let responseObservable: any;\n if (typeof url === 'string') {\n responseObservable = httpRequest(\n this._backend,\n new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Get, <string>url)));\n } else if (url instanceof Request) {\n responseObservable = httpRequest(this._backend, url);\n } else {\n throw new Error('First argument must be a url string or Request instance.');\n }\n return responseObservable;\n }\n\n /**\n * Performs a request with `get` http method.\n */\n get(url: string, options?: RequestOptionsArgs): Observable<Response> {\n return this.request(\n new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Get, url)));\n }\n\n /**\n * Performs a request with `post` http method.\n */\n post(url: string, body: any, options?: RequestOptionsArgs): Observable<Response> {\n return this.request(new Request(mergeOptions(\n this._defaultOptions.merge(new RequestOptions({body: body})), options, RequestMethod.Post,\n url)));\n }\n\n /**\n * Performs a request with `put` http method.\n */\n put(url: string, body: any, options?: RequestOptionsArgs): Observable<Response> {\n return this.request(new Request(mergeOptions(\n this._defaultOptions.merge(new RequestOptions({body: body})), options, RequestMethod.Put,\n url)));\n }\n\n /**\n * Performs a request with `delete` http method.\n */\n delete (url: string, options?: RequestOptionsArgs): Observable<Response> {\n return this.request(\n new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Delete, url)));\n }\n\n /**\n * Performs a request with `patch` http method.\n */\n patch(url: string, body: any, options?: RequestOptionsArgs): Observable<Response> {\n return this.request(new Request(mergeOptions(\n this._defaultOptions.merge(new RequestOptions({body: body})), options, RequestMethod.Patch,\n url)));\n }\n\n /**\n * Performs a request with `head` http method.\n */\n head(url: string, options?: RequestOptionsArgs): Observable<Response> {\n return this.request(\n new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Head, url)));\n }\n\n /**\n * Performs a request with `options` http method.\n */\n options(url: string, options?: RequestOptionsArgs): Observable<Response> {\n return this.request(\n new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Options, url)));\n }\n}\n\n\n/**\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\n@Injectable()\nexport class Jsonp extends Http {\n constructor(backend: ConnectionBackend, defaultOptions: RequestOptions) {\n super(backend, defaultOptions);\n }\n\n /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n *\n * @security Regular XHR is the safest alternative to JSONP for most applications, and is\n * supported by all current browsers. Because JSONP creates a `<script>` element with\n * contents retrieved from a remote source, attacker-controlled data introduced by an untrusted\n * source could expose your application to XSS risks. Data exposed by JSONP may also be\n * readable by malicious third-party websites. In addition, JSONP introduces potential risk for\n * future security issues (e.g. content sniffing). For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n */\n request(url: string|Request, options?: RequestOptionsArgs): Observable<Response> {\n let responseObservable: any;\n if (typeof url === 'string') {\n url =\n new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Get, <string>url));\n }\n if (url instanceof Request) {\n if (url.method !== RequestMethod.Get) {\n throw new Error('JSONP requests must use GET request method.');\n }\n responseObservable = httpRequest(this._backend, url);\n } else {\n throw new Error('First argument must be a url string or Request instance.');\n }\n return responseObservable;\n }\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/**\n * @module\n * @description\n * The http module provides services to perform http requests. To get started, see the {@link Http}\n * class.\n */\nimport {NgModule} from '@angular/core';\n\nimport {BrowserJsonp} from './backends/browser_jsonp';\nimport {BrowserXhr} from './backends/browser_xhr';\nimport {JSONPBackend} from './backends/jsonp_backend';\nimport {CookieXSRFStrategy, XHRBackend} from './backends/xhr_backend';\nimport {BaseRequestOptions, RequestOptions} from './base_request_options';\nimport {BaseResponseOptions, ResponseOptions} from './base_response_options';\nimport {Http, Jsonp} from './http';\nimport {XSRFStrategy} from './interfaces';\n\n\nexport function _createDefaultCookieXSRFStrategy() {\n return new CookieXSRFStrategy();\n}\n\nexport function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http {\n return new Http(xhrBackend, requestOptions);\n}\n\nexport function jsonpFactory(jsonpBackend: JSONPBackend, requestOptions: RequestOptions): Jsonp {\n return new Jsonp(jsonpBackend, requestOptions);\n}\n\n\n/**\n * The module that includes http's providers\n *\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\n@NgModule({\n providers: [\n // TODO(pascal): use factory type annotations once supported in DI\n // issue: https://github.com/angular/angular/issues/3183\n {provide: Http, useFactory: httpFactory, deps: [XHRBackend, RequestOptions]},\n BrowserXhr,\n {provide: RequestOptions, useClass: BaseRequestOptions},\n {provide: ResponseOptions, useClass: BaseResponseOptions},\n XHRBackend,\n {provide: XSRFStrategy, useFactory: _createDefaultCookieXSRFStrategy},\n ],\n})\nexport class HttpModule {\n}\n\n/**\n * The module that includes jsonp's providers\n *\n * @deprecated see https://angular.io/api/common/http/HttpClient#jsonp\n * @publicApi\n */\n@NgModule({\n providers: [\n // TODO(pascal): use factory type annotations once supported in DI\n // issue: https://github.com/angular/angular/issues/3183\n {provide: Jsonp, useFactory: jsonpFactory, deps: [JSONPBackend, RequestOptions]},\n BrowserJsonp,\n {provide: RequestOptions, useClass: BaseRequestOptions},\n {provide: ResponseOptions, useClass: BaseResponseOptions},\n JSONPBackend,\n ],\n})\nexport class JsonpModule {\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/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n/**\n * @deprecated see https://angular.io/guide/http\n * @publicApi\n */\nexport const VERSION = new Version('8.0.0-beta.10+1.sha-a28b3e3');\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\nexport {BrowserXhr} from './backends/browser_xhr';\nexport {JSONPBackend, JSONPConnection} from './backends/jsonp_backend';\nexport {CookieXSRFStrategy, XHRBackend, XHRConnection} from './backends/xhr_backend';\nexport {BaseRequestOptions, RequestOptions} from './base_request_options';\nexport {BaseResponseOptions, ResponseOptions} from './base_response_options';\nexport {ReadyState, RequestMethod, ResponseContentType, ResponseType} from './enums';\nexport {Headers} from './headers';\nexport {Http, Jsonp} from './http';\nexport {HttpModule, JsonpModule} from './http_module';\nexport {Connection, ConnectionBackend, RequestOptionsArgs, ResponseOptionsArgs, XSRFStrategy} from './interfaces';\nexport {Request} from './static_request';\nexport {Response} from './static_response';\nexport {QueryEncoder, URLSearchParams} from './url_search_params';\nexport {VERSION} from './version';\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/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\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// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {BrowserJsonp as ɵangular_packages_http_http_e} from './src/backends/browser_jsonp';\nexport {Body as ɵangular_packages_http_http_f} from './src/body';\nexport {_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';\nexport {RequestArgs as ɵangular_packages_http_http_d} from './src/interfaces';"],"names":["Injectable","RequestMethod","ReadyState","ResponseType","ResponseContentType","tslib_1.__extends","Observable","getDOM","ArrayBuffer","Blob","NgModule","Version"],"mappings":";;;;;;;;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;;AAEF,IAAO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;IAChC,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;IAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;AACD,AAqBA;AACA,IAAO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,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