blob: b50f5c6ccf0f3d2f363613421df0b5429f0728e3 [file] [log] [blame]
{"version":3,"file":"http.js","sources":["../src/backends/browser_xhr.ts","../src/enums.ts","../src/headers.ts","../src/base_response_options.ts","../src/interfaces.ts","../src/http_utils.ts","../src/url_search_params.ts","../src/body.ts","../src/static_response.ts","../src/backends/browser_jsonp.ts","../src/backends/jsonp_backend.ts","../src/backends/xhr_backend.ts","../src/base_request_options.ts","../src/static_request.ts","../src/http.ts","../src/http_module.ts","../src/version.ts","../http.ts"],"sourcesContent":["/**\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 * 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":["getDOM","ArrayBuffer","Blob"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAa,UAAU;IACrB,iBAAgB;;;;IAChB,KAAK,KAAU,2BAAa,IAAI,cAAc,EAAE,IAAE,EAAE;;;YAHrD,UAAU;;;;;;;;;;;;;;;;;;ICJT,MAAG;IACH,OAAI;IACJ,MAAG;IACH,SAAM;IACN,UA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