1
|
{"version":3,"file":"common-http.umd.min.js","sources":["../../../../packages/common/http/src/xsrf.ts","../../../../packages/common/http/src/module.ts","../../../../packages/common/http/src/xhr.ts","../../../../packages/common/http/src/jsonp.ts","../../../../packages/common/http/src/interceptor.ts","../../../../packages/common/http/src/params.ts","../../../../packages/common/http/src/headers.ts","../../../../packages/common/http/src/request.ts","../../../../packages/common/http/src/response.ts","../../../../packages/common/http/src/client.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\n\nimport {DOCUMENT, ɵparseCookieValue as parseCookieValue} from '@angular/common';\nimport {Inject, Injectable, InjectionToken, PLATFORM_ID} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\n\nimport {HttpHandler} from './backend';\nimport {HttpInterceptor} from './interceptor';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\nexport const /** @type {?} */ XSRF_COOKIE_NAME = new InjectionToken<string>('XSRF_COOKIE_NAME');\nexport const /** @type {?} */ XSRF_HEADER_NAME = new InjectionToken<string>('XSRF_HEADER_NAME');\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n * \n * \\@experimental\n * @abstract\n */\nexport abstract class HttpXsrfTokenExtractor {\n/**\n * Get the XSRF token to use with an outgoing request.\n * \n * Will be called for every request, so the token may change between requests.\n * @abstract\n * @return {?}\n */\ngetToken() {}\n}\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nexport class HttpXsrfCookieExtractor implements HttpXsrfTokenExtractor {\nprivate lastCookieString: string = '';\nprivate lastToken: string|null = null;\n/**\n * \\@internal for testing\n */\nparseCount: number = 0;\n/**\n * @param {?} doc\n * @param {?} platform\n * @param {?} cookieName\n */\nconstructor(\nprivate doc: any,\nprivate platform: string,\nprivate cookieName: string) {}\n/**\n * @return {?}\n */\ngetToken(): string|null {\n if (this.platform === 'server') {\n return null;\n }\n const /** @type {?} */ cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = parseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: undefined, decorators: [{ type: Inject, args: [DOCUMENT, ] }, ]},\n{type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID, ] }, ]},\n{type: undefined, decorators: [{ type: Inject, args: [XSRF_COOKIE_NAME, ] }, ]},\n];\n}\n\nfunction HttpXsrfCookieExtractor_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpXsrfCookieExtractor.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nHttpXsrfCookieExtractor.ctorParameters;\n/** @type {?} */\nHttpXsrfCookieExtractor.prototype.lastCookieString;\n/** @type {?} */\nHttpXsrfCookieExtractor.prototype.lastToken;\n/**\n * \\@internal for testing\n * @type {?}\n */\nHttpXsrfCookieExtractor.prototype.parseCount;\n/** @type {?} */\nHttpXsrfCookieExtractor.prototype.doc;\n/** @type {?} */\nHttpXsrfCookieExtractor.prototype.platform;\n/** @type {?} */\nHttpXsrfCookieExtractor.prototype.cookieName;\n}\n\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nexport class HttpXsrfInterceptor implements HttpInterceptor {\n/**\n * @param {?} tokenService\n * @param {?} headerName\n */\nconstructor(\nprivate tokenService: HttpXsrfTokenExtractor,\nprivate headerName: string) {}\n/**\n * @param {?} req\n * @param {?} next\n * @return {?}\n */\nintercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n const /** @type {?} */ lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||\n lcUrl.startsWith('https://')) {\n return next.handle(req);\n }\n const /** @type {?} */ token = this.tokenService.getToken();\n\n // Be careful not to overwrite an existing header of the same name.\n if (token !== null && !req.headers.has(this.headerName)) {\n req = req.clone({headers: req.headers.set(this.headerName, token)});\n }\n return next.handle(req);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: HttpXsrfTokenExtractor, },\n{type: undefined, decorators: [{ type: Inject, args: [XSRF_HEADER_NAME, ] }, ]},\n];\n}\n\nfunction HttpXsrfInterceptor_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpXsrfInterceptor.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nHttpXsrfInterceptor.ctorParameters;\n/** @type {?} */\nHttpXsrfInterceptor.prototype.tokenService;\n/** @type {?} */\nHttpXsrfInterceptor.prototype.headerName;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\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\nimport {Inject, ModuleWithProviders, NgModule, Optional} from '@angular/core';\n\nimport {HttpBackend, HttpHandler} from './backend';\nimport {HttpClient} from './client';\nimport {HTTP_INTERCEPTORS, HttpInterceptor, HttpInterceptorHandler, NoopInterceptor} from './interceptor';\nimport {JsonpCallbackContext, JsonpClientBackend, JsonpInterceptor} from './jsonp';\nimport {BrowserXhr, HttpXhrBackend, XhrFactory} from './xhr';\nimport {HttpXsrfCookieExtractor, HttpXsrfInterceptor, HttpXsrfTokenExtractor, XSRF_COOKIE_NAME, XSRF_HEADER_NAME} from './xsrf';\n/**\n * Constructs an `HttpHandler` that applies a bunch of `HttpInterceptor`s\n * to a request before passing it to the given `HttpBackend`.\n * \n * Meant to be used as a factory function within `HttpClientModule`.\n * \n * \\@experimental\n * @param {?} backend\n * @param {?=} interceptors\n * @return {?}\n */\nexport function interceptingHandler(\n backend: HttpBackend, interceptors: HttpInterceptor[] | null = []): HttpHandler {\n if (!interceptors) {\n return backend;\n }\n return interceptors.reduceRight(\n (next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend);\n}\n/**\n * Factory function that determines where to store JSONP callbacks.\n * \n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n * \n * \\@experimental\n * @return {?}\n */\nexport function jsonpCallbackContext(): Object {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}\n/**\n * `NgModule` which adds XSRF protection support to outgoing requests.\n * \n * Provided the server supports a cookie-based XSRF protection system, this\n * module can be used directly to configure XSRF protection with the correct\n * cookie and header names.\n * \n * If no such names are provided, the default is to use `X-XSRF-TOKEN` for\n * the header name and `XSRF-TOKEN` for the cookie name.\n * \n * \\@experimental\n */\nexport class HttpClientXsrfModule {\n/**\n * Disable the default XSRF protection.\n * @return {?}\n */\nstatic disable(): ModuleWithProviders {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n {provide: HttpXsrfInterceptor, useClass: NoopInterceptor},\n ],\n };\n }\n/**\n * Configure XSRF protection to use the given cookie name or header name,\n * or the default names (as described above) if not provided.\n * @param {?=} options\n * @return {?}\n */\nstatic withOptions(options: {\n cookieName?: string,\n headerName?: string,\n } = {}): ModuleWithProviders {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n options.cookieName ? {provide: XSRF_COOKIE_NAME, useValue: options.cookieName} : [],\n options.headerName ? {provide: XSRF_HEADER_NAME, useValue: options.headerName} : [],\n ],\n };\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n providers: [\n HttpXsrfInterceptor,\n {provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true},\n {provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor},\n {provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN'},\n {provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN'},\n ],\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction HttpClientXsrfModule_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpClientXsrfModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nHttpClientXsrfModule.ctorParameters;\n}\n\n/**\n * `NgModule` which provides the `HttpClient` and associated services.\n * \n * Interceptors can be added to the chain behind `HttpClient` by binding them\n * to the multiprovider for `HTTP_INTERCEPTORS`.\n * \n * \\@experimental\n */\nexport class HttpClientModule {\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [\n HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN',\n }),\n ],\n providers: [\n HttpClient,\n // HttpHandler is the backend + interceptors and is constructed\n // using the interceptingHandler factory function.\n {\n provide: HttpHandler,\n useFactory: interceptingHandler,\n deps: [HttpBackend, [new Optional(), new Inject(HTTP_INTERCEPTORS)]],\n },\n HttpXhrBackend,\n {provide: HttpBackend, useExisting: HttpXhrBackend},\n BrowserXhr,\n {provide: XhrFactory, useExisting: BrowserXhr},\n ],\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction HttpClientModule_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpClientModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nHttpClientModule.ctorParameters;\n}\n\n/**\n * `NgModule` which enables JSONP support in `HttpClient`.\n * \n * Without this module, Jsonp requests will reach the backend\n * with method JSONP, where they'll be rejected.\n * \n * \\@experimental\n */\nexport class HttpClientJsonpModule {\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n providers: [\n JsonpClientBackend,\n {provide: JsonpCallbackContext, useFactory: jsonpCallbackContext},\n {provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true},\n ],\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction HttpClientJsonpModule_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpClientJsonpModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nHttpClientJsonpModule.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\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\nimport {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Observer} from 'rxjs/Observer';\n\nimport {HttpBackend} from './backend';\nimport {HttpHeaders} from './headers';\nimport {HttpRequest} from './request';\nimport {HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpJsonParseError, HttpResponse, HttpUploadProgressEvent} from './response';\n\nconst /** @type {?} */ XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n * @param {?} xhr\n * @return {?}\n */\nfunction getResponseUrl(xhr: any): string|null {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n * \n * \\@experimental\n * @abstract\n */\nexport abstract class XhrFactory {\n/**\n * @abstract\n * @return {?}\n */\nbuild() {} }\n/**\n * A factory for \\@{link HttpXhrBackend} that uses the `XMLHttpRequest` browser API.\n * \n * \\@experimental\n */\nexport class BrowserXhr implements XhrFactory {\nconstructor() {}\n/**\n * @return {?}\n */\nbuild(): any { return /** @type {?} */(( <any>(new XMLHttpRequest()))); }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction BrowserXhr_tsickle_Closure_declarations() {\n/** @type {?} */\nBrowserXhr.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nBrowserXhr.ctorParameters;\n}\n\n\n/**\n * Tracks a response from the server that does not yet have a body.\n */\ninterface PartialResponse {\n headers: HttpHeaders;\n status: number;\n statusText: string;\n url: string;\n}\n/**\n * An `HttpBackend` which uses the XMLHttpRequest API to send\n * requests to a backend server.\n * \n * \\@experimental\n */\nexport class HttpXhrBackend implements HttpBackend {\n/**\n * @param {?} xhrFactory\n */\nconstructor(private xhrFactory: XhrFactory) {}\n/**\n * Process a request and return a stream of response events.\n * @param {?} req\n * @return {?}\n */\nhandle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the JsonpClientModule\n if (req.method === 'JSONP') {\n throw new Error(`Attempted to construct Jsonp request without JsonpClientModule installed.`);\n }\n\n // Everything happens on Observable subscription.\n return new Observable((observer: Observer<HttpEvent<any>>) => {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n const /** @type {?} */ xhr = this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n\n // Add all the requested headers.\n req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n const /** @type {?} */ detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n\n // Set the responseType if one was requested.\n if (req.responseType) {\n const /** @type {?} */ responseType = req.responseType.toLowerCase();\n\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = /** @type {?} */(( ((responseType !== 'json') ? responseType : 'text') as any));\n }\n\n // Serialize the request body if one is present. If not, this will be set to null.\n const /** @type {?} */ reqBody = req.serializeBody();\n\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n let /** @type {?} */ headerResponse: HttpHeaderResponse|null = null;\n\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n const /** @type {?} */ partialFromXhr = (): HttpHeaderResponse => {\n if (headerResponse !== null) {\n return headerResponse;\n }\n\n // Read status and normalize an IE9 bug (http://bugs.jquery.com/ticket/1450).\n const /** @type {?} */ status: number = xhr.status === 1223 ? 204 : xhr.status;\n const /** @type {?} */ statusText = xhr.statusText || 'OK';\n\n // Parse headers from XMLHttpRequest - this step is lazy.\n const /** @type {?} */ headers = new HttpHeaders(xhr.getAllResponseHeaders());\n\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n const /** @type {?} */ url = getResponseUrl(xhr) || req.url;\n\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({headers, status, statusText, url});\n return headerResponse;\n };\n\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n\n // First up is the load event, which represents a response being fully available.\n const /** @type {?} */ onLoad = () => {\n // Read response state from the memoized partial data.\n let {headers, status, statusText, url} = partialFromXhr();\n\n // The body will be read out if present.\n let /** @type {?} */ body: any|null = null;\n\n if (status !== 204) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 : 0;\n }\n\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n let /** @type {?} */ ok = status >= 200 && status < 300;\n\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (ok && req.responseType === 'json' && typeof body === 'string') {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body.replace(XSSI_PREFIX, '');\n try {\n body = JSON.parse(body);\n } catch ( /** @type {?} */error) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = /** @type {?} */(( { error, text: body } as HttpJsonParseError));\n }\n } else if (!ok && req.responseType === 'json' && typeof body === 'string') {\n try {\n // Attempt to parse the body as JSON.\n body = JSON.parse(body);\n } catch ( /** @type {?} */error) {\n // Cannot be certain that the body was meant to be parsed as JSON.\n // Leave the body as a string.\n }\n }\n\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n } else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n }\n };\n\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n const /** @type {?} */ onError = (error: ErrorEvent) => {\n const /** @type {?} */ res = new HttpErrorResponse({\n error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n });\n observer.error(res);\n };\n\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progerss event.\n let /** @type {?} */ sentHeaders = false;\n\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n const /** @type {?} */ onDownProgress = (event: ProgressEvent) => {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n\n // Start building the download progress event to deliver on the response\n // event stream.\n let /** @type {?} */ progressEvent: HttpDownloadProgressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n const /** @type {?} */ onUpProgress = (event: ProgressEvent) => {\n // Upload progress events are simpler. Begin building the progress\n // event.\n let /** @type {?} */ progress: HttpUploadProgressEvent = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n\n // Send the event.\n observer.next(progress);\n };\n\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({type: HttpEventType.Sent});\n\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return () => {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('load', onLoad);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n\n // Finally, abort the in-flight request.\n xhr.abort();\n };\n });\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: XhrFactory, },\n];\n}\n\nfunction HttpXhrBackend_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpXhrBackend.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nHttpXhrBackend.ctorParameters;\n/** @type {?} */\nHttpXhrBackend.prototype.xhrFactory;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\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\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Observer} from 'rxjs/Observer';\n\nimport {HttpBackend, HttpHandler} from './backend';\nimport {HttpRequest} from './request';\nimport {HttpErrorResponse, HttpEvent, HttpEventType, HttpResponse} from './response';\n\n// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nlet /** @type {?} */ nextRequestId: number = 0;\n\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nexport const /** @type {?} */ JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nexport const /** @type {?} */ JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nexport const /** @type {?} */ JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n * \n * In the browser, this should always be the `window` object.\n * \n * \\@experimental\n * @abstract\n */\nexport abstract class JsonpCallbackContext { [key: string]: (data: any) => void; }\n/**\n * `HttpBackend` that only processes `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * \n * \\@experimental\n */\nexport class JsonpClientBackend implements HttpBackend {\n/**\n * @param {?} callbackMap\n * @param {?} document\n */\nconstructor(private callbackMap: JsonpCallbackContext,\nprivate document: any) {}\n/**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n * @return {?}\n */\nprivate nextCallback(): string { return `ng_jsonp_callback_${nextRequestId++}`; }\n/**\n * Process a JSONP request and return an event stream of the results.\n * @param {?} req\n * @return {?}\n */\nhandle(req: HttpRequest<never>): Observable<HttpEvent<any>> {\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n } else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n\n // Everything else happens inside the Observable boundary.\n return new Observable<HttpEvent<any>>((observer: Observer<HttpEvent<any>>) => {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n const /** @type {?} */ callback = this.nextCallback();\n const /** @type {?} */ url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n\n // Construct the <script> tag and point it at the URL.\n const /** @type {?} */ node = this.document.createElement('script');\n node.src = url;\n\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n\n // The response object, if one has been received, or null otherwise.\n let /** @type {?} */ body: any|null = null;\n\n // Whether the response callback has been called.\n let /** @type {?} */ finished: boolean = false;\n\n // Whether the request has been cancelled (and thus any other callbacks)\n // should be ignored.\n let /** @type {?} */ cancelled: boolean = false;\n\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n this.callbackMap[callback] = (data?: any) => {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete this.callbackMap[callback];\n\n // Next, make sure the request wasn't cancelled in the meantime.\n if (cancelled) {\n return;\n }\n\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n const /** @type {?} */ cleanup = () => {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete this.callbackMap[callback];\n };\n\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n const /** @type {?} */ onLoad = (event: Event) => {\n // Do nothing if the request has been cancelled.\n if (cancelled) {\n return;\n }\n\n // Cleanup the page.\n cleanup();\n\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body,\n status: 200,\n statusText: 'OK', url,\n }));\n\n // Complete the stream, the resposne is over.\n observer.complete();\n };\n\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n const /** @type {?} */ onError: any = (error: Error) => {\n // If the request was already cancelled, no need to emit anything.\n if (cancelled) {\n return;\n }\n cleanup();\n\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error,\n status: 0,\n statusText: 'JSONP Error', url,\n }));\n };\n\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n this.document.body.appendChild(node);\n\n // The request has now been successfully sent.\n observer.next({type: HttpEventType.Sent});\n\n // Cancellation handler.\n return () => {\n // Track the cancellation so event listeners won't do anything even if already scheduled.\n cancelled = true;\n\n // Remove the event listeners so they won't run if the events later fire.\n node.removeEventListener('load', onLoad);\n node.removeEventListener('error', onError);\n\n // And finally, clean up the page.\n cleanup();\n };\n });\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: JsonpCallbackContext, },\n{type: undefined, decorators: [{ type: Inject, args: [DOCUMENT, ] }, ]},\n];\n}\n\nfunction JsonpClientBackend_tsickle_Closure_declarations() {\n/** @type {?} */\nJsonpClientBackend.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nJsonpClientBackend.ctorParameters;\n/** @type {?} */\nJsonpClientBackend.prototype.callbackMap;\n/** @type {?} */\nJsonpClientBackend.prototype.document;\n}\n\n/**\n * An `HttpInterceptor` which identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n * \n * \\@experimental\n */\nexport class JsonpInterceptor {\n/**\n * @param {?} jsonp\n */\nconstructor(private jsonp: JsonpClientBackend) {}\n/**\n * @param {?} req\n * @param {?} next\n * @return {?}\n */\nintercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (req.method === 'JSONP') {\n return this.jsonp.handle( /** @type {?} */((req as HttpRequest<never>)));\n }\n // Fall through for normal HTTP requests.\n return next.handle(req);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: JsonpClientBackend, },\n];\n}\n\nfunction JsonpInterceptor_tsickle_Closure_declarations() {\n/** @type {?} */\nJsonpInterceptor.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nJsonpInterceptor.ctorParameters;\n/** @type {?} */\nJsonpInterceptor.prototype.jsonp;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\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\nimport {Injectable, InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\n\nimport {HttpHandler} from './backend';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\n/**\n * Intercepts `HttpRequest` and handles them.\n *\n * Most interceptors will transform the outgoing request before passing it to the\n * next interceptor in the chain, by calling `next.handle(transformedReq)`.\n *\n * In rare cases, interceptors may wish to completely handle a request themselves,\n * and not delegate to the remainder of the chain. This behavior is allowed.\n *\n * @experimental\n */\nexport interface HttpInterceptor {\n /**\n * Intercept an outgoing `HttpRequest` and optionally transform it or the\n * response.\n *\n * Typically an interceptor will transform the outgoing request before returning\n * `next.handle(transformedReq)`. An interceptor may choose to transform the\n * response event stream as well, by applying additional Rx operators on the stream\n * returned by `next.handle()`.\n *\n * More rarely, an interceptor may choose to completely handle the request itself,\n * and compose a new event stream instead of invoking `next.handle()`. This is\n * acceptable behavior, but keep in mind further interceptors will be skipped entirely.\n *\n * It is also rare but valid for an interceptor to return multiple responses on the\n * event stream for a single request.\n */\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;\n}\n/**\n * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\n * \n * \\@experimental\n */\nexport class HttpInterceptorHandler implements HttpHandler {\n/**\n * @param {?} next\n * @param {?} interceptor\n */\nconstructor(private next: HttpHandler,\nprivate interceptor: HttpInterceptor) {}\n/**\n * @param {?} req\n * @return {?}\n */\nhandle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n return this.interceptor.intercept(req, this.next);\n }\n}\n\nfunction HttpInterceptorHandler_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpInterceptorHandler.prototype.next;\n/** @type {?} */\nHttpInterceptorHandler.prototype.interceptor;\n}\n\n/**\n * A multi-provider token which represents the array of `HttpInterceptor`s that\n * are registered.\n * \n * \\@experimental\n */\nexport const HTTP_INTERCEPTORS = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS');\nexport class NoopInterceptor implements HttpInterceptor {\n/**\n * @param {?} req\n * @param {?} next\n * @return {?}\n */\nintercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n return next.handle(req);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction NoopInterceptor_tsickle_Closure_declarations() {\n/** @type {?} */\nNoopInterceptor.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nNoopInterceptor.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\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 * A codec for encoding and decoding parameters in URLs.\n *\n * Used by `HttpParams`.\n *\n * @experimental\n **/\nexport interface HttpParameterCodec {\n encodeKey(key: string): string;\n encodeValue(value: string): string;\n\n decodeKey(key: string): string;\n decodeValue(value: string): string;\n}\n/**\n * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to\n * serialize and parse URL parameter keys and values.\n * \n * \\@experimental\n */\nexport class HttpUrlEncodingCodec implements HttpParameterCodec {\n/**\n * @param {?} k\n * @return {?}\n */\nencodeKey(k: string): string { return standardEncoding(k); }\n/**\n * @param {?} v\n * @return {?}\n */\nencodeValue(v: string): string { return standardEncoding(v); }\n/**\n * @param {?} k\n * @return {?}\n */\ndecodeKey(k: string): string { return decodeURIComponent(k); }\n/**\n * @param {?} v\n * @return {?}\n */\ndecodeValue(v: string) { return decodeURIComponent(v); }\n}\n/**\n * @param {?} rawParams\n * @param {?} codec\n * @return {?}\n */\nfunction paramParser(rawParams: string, codec: HttpParameterCodec): Map<string, string[]> {\n const /** @type {?} */ map = new Map<string, string[]>();\n if (rawParams.length > 0) {\n const /** @type {?} */ params: string[] = rawParams.split('&');\n params.forEach((param: string) => {\n const /** @type {?} */ eqIdx = param.indexOf('=');\n const [key, val]: string[] = eqIdx == -1 ?\n [codec.decodeKey(param), ''] :\n [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n const /** @type {?} */ list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n/**\n * @param {?} v\n * @return {?}\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\ninterface Update {\n param: string;\n value?: string;\n op: 'a'|'d'|'s';\n}\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n * \n * This class is immuatable - all mutation operations return a new instance.\n * \n * \\@experimental\n */\nexport class HttpParams {\nprivate map: Map<string, string[]>|null;\nprivate encoder: HttpParameterCodec;\nprivate updates: Update[]|null = null;\nprivate cloneFrom: HttpParams|null = null;\n/**\n * @param {?=} options\n */\nconstructor(options: {\n fromString?: string,\n encoder?: HttpParameterCodec,\n } = {}) {\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n this.map = !!options.fromString ? paramParser(options.fromString, this.encoder) : null;\n }\n/**\n * Check whether the body has one or more values for the given parameter name.\n * @param {?} param\n * @return {?}\n */\nhas(param: string): boolean {\n this.init();\n return /** @type {?} */(( this.map)).has(param);\n }\n/**\n * Get the first value for the given parameter name, or `null` if it's not present.\n * @param {?} param\n * @return {?}\n */\nget(param: string): string|null {\n this.init();\n const /** @type {?} */ res = /** @type {?} */(( this.map)).get(param);\n return !!res ? res[0] : null;\n }\n/**\n * Get all values for the given parameter name, or `null` if it's not present.\n * @param {?} param\n * @return {?}\n */\ngetAll(param: string): string[]|null {\n this.init();\n return /** @type {?} */(( this.map)).get(param) || null;\n }\n/**\n * Get all the parameter names for this body.\n * @return {?}\n */\nkeys(): string[] {\n this.init();\n return Array.from( /** @type {?} */((this.map)).keys());\n }\n/**\n * Construct a new body with an appended value for the given parameter name.\n * @param {?} param\n * @param {?} value\n * @return {?}\n */\nappend(param: string, value: string): HttpParams { return this.clone({param, value, op: 'a'}); }\n/**\n * Construct a new body with a new value for the given parameter name.\n * @param {?} param\n * @param {?} value\n * @return {?}\n */\nset(param: string, value: string): HttpParams { return this.clone({param, value, op: 's'}); }\n/**\n * Construct a new body with either the given value for the given parameter\n * removed, if a value is given, or all values for the given parameter removed\n * if not.\n * @param {?} param\n * @param {?=} value\n * @return {?}\n */\ndelete (param: string, value?: string): HttpParams { return this.clone({param, value, op: 'd'}); }\n/**\n * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n * @return {?}\n */\ntoString(): string {\n this.init();\n return this.keys()\n .map(key => {\n const /** @type {?} */ eKey = this.encoder.encodeKey(key);\n return /** @type {?} */(( /** @type {?} */(( this.map)).get(key))).map(value => eKey + '=' + this.encoder.encodeValue(value))\n .join('&');\n })\n .join('&');\n }\n/**\n * @param {?} update\n * @return {?}\n */\nprivate clone(update: Update): HttpParams {\n const /** @type {?} */ clone = new HttpParams({encoder: this.encoder});\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat([update]);\n return clone;\n }\n/**\n * @return {?}\n */\nprivate init() {\n if (this.map === null) {\n this.map = new Map<string, string[]>();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach(key => /** @type {?} */(( this.map)).set(key, /** @type {?} */(( /** @type {?} */(( /** @type {?} */(( this.cloneFrom)).map)).get(key))))); /** @type {?} */((\n this.updates)).forEach(update => {\n switch (update.op) {\n case 'a':\n case 's':\n const /** @type {?} */ base = (update.op === 'a' ? /** @type {?} */(( this.map)).get(update.param) : undefined) || [];\n base.push( /** @type {?} */((update.value))); /** @type {?} */((\n this.map)).set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n let /** @type {?} */ base = /** @type {?} */(( this.map)).get(update.param) || [];\n const /** @type {?} */ idx = base.indexOf(update.value);\n if (idx !== -1) {\n base.splice(idx, 1);\n }\n if (base.length > 0) { /** @type {?} */((\n this.map)).set(update.param, base);\n } else { /** @type {?} */((\n this.map)).delete(update.param);\n }\n } else { /** @type {?} */((\n this.map)).delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = null;\n }\n }\n}\n\nfunction HttpParams_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpParams.prototype.map;\n/** @type {?} */\nHttpParams.prototype.encoder;\n/** @type {?} */\nHttpParams.prototype.updates;\n/** @type {?} */\nHttpParams.prototype.cloneFrom;\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\ninterface Update {\n name: string;\n value?: string|string[];\n op: 'a'|'s'|'d';\n}\n/**\n * Immutable set of Http headers, with lazy parsing.\n * \\@experimental\n */\nexport class HttpHeaders {\n/**\n * Internal map of lowercase header names to values.\n */\nprivate headers: Map<string, string[]>;\n/**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\nprivate normalizedNames: Map<string, string> = new Map();\n/**\n * Complete the lazy initialization of this object (needed before reading).\n */\nprivate lazyInit: HttpHeaders|Function|null;\n/**\n * Queued updates to be materialized the next initialization.\n */\nprivate lazyUpdate: Update[]|null = null;\n/**\n * @param {?=} headers\n */\nconstructor(headers?: string|{[name: string]: string | string[]}) {\n if (!headers) {\n this.headers = new Map<string, string[]>();\n } else if (typeof headers === 'string') {\n this.lazyInit = () => {\n this.headers = new Map<string, string[]>();\n headers.split('\\n').forEach(line => {\n const index = line.indexOf(':');\n if (index > 0) {\n const name = line.slice(0, index);\n const key = name.toLowerCase();\n const value = line.slice(index + 1).trim();\n this.maybeSetNormalizedName(name, key);\n if (this.headers.has(key)) {\n this.headers.get(key) !.push(value);\n } else {\n this.headers.set(key, [value]);\n }\n }\n });\n };\n } else {\n this.lazyInit = () => {\n this.headers = new Map<string, string[]>();\n Object.keys(headers).forEach(name => {\n let values: string|string[] = headers[name];\n const key = name.toLowerCase();\n if (typeof values === 'string') {\n values = [values];\n }\n if (values.length > 0) {\n this.headers.set(key, values);\n this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n/**\n * Checks for existence of header by given name.\n * @param {?} name\n * @return {?}\n */\nhas(name: string): boolean {\n this.init();\n\n return this.headers.has(name.toLowerCase());\n }\n/**\n * Returns first header that matches given name.\n * @param {?} name\n * @return {?}\n */\nget(name: string): string|null {\n this.init();\n\n const /** @type {?} */ values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n }\n/**\n * Returns the names of the headers\n * @return {?}\n */\nkeys(): string[] {\n this.init();\n\n return Array.from(this.normalizedNames.values());\n }\n/**\n * Returns list of header values for a given name.\n * @param {?} name\n * @return {?}\n */\ngetAll(name: string): string[]|null {\n this.init();\n\n return this.headers.get(name.toLowerCase()) || null;\n }\n/**\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\nappend(name: string, value: string|string[]): HttpHeaders {\n return this.clone({name, value, op: 'a'});\n }\n/**\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\nset(name: string, value: string|string[]): HttpHeaders {\n return this.clone({name, value, op: 's'});\n }\n/**\n * @param {?} name\n * @param {?=} value\n * @return {?}\n */\ndelete (name: string, value?: string|string[]): HttpHeaders {\n return this.clone({name, value, op: 'd'});\n }\n/**\n * @param {?} name\n * @param {?} lcName\n * @return {?}\n */\nprivate maybeSetNormalizedName(name: string, lcName: string): void {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n }\n/**\n * @return {?}\n */\nprivate init(): void {\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n } else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(update => this.applyUpdate(update));\n this.lazyUpdate = null;\n }\n }\n }\n/**\n * @param {?} other\n * @return {?}\n */\nprivate copyFrom(other: HttpHeaders) {\n other.init();\n Array.from(other.headers.keys()).forEach(key => {\n this.headers.set(key, /** @type {?} */(( other.headers.get(key))));\n this.normalizedNames.set(key, /** @type {?} */(( other.normalizedNames.get(key))));\n });\n }\n/**\n * @param {?} update\n * @return {?}\n */\nprivate clone(update: Update): HttpHeaders {\n const /** @type {?} */ clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n }\n/**\n * @param {?} update\n * @return {?}\n */\nprivate applyUpdate(update: Update): void {\n const /** @type {?} */ key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n let /** @type {?} */ value = /** @type {?} */(( update.value));\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n const /** @type {?} */ base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push(...value);\n this.headers.set(key, base);\n break;\n case 'd':\n const /** @type {?} */ toDelete = /** @type {?} */(( update.value as string | undefined));\n if (!toDelete) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n } else {\n let /** @type {?} */ existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(value => toDelete.indexOf(value) === -1);\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n } else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n }\n/**\n * \\@internal\n * @param {?} fn\n * @return {?}\n */\nforEach(fn: (name: string, values: string[]) => void) {\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(key => fn( /** @type {?} */((this.normalizedNames.get(key))), /** @type {?} */(( this.headers.get(key)))));\n }\n}\n\nfunction HttpHeaders_tsickle_Closure_declarations() {\n/**\n * Internal map of lowercase header names to values.\n * @type {?}\n */\nHttpHeaders.prototype.headers;\n/**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n * @type {?}\n */\nHttpHeaders.prototype.normalizedNames;\n/**\n * Complete the lazy initialization of this object (needed before reading).\n * @type {?}\n */\nHttpHeaders.prototype.lazyInit;\n/**\n * Queued updates to be materialized the next initialization.\n * @type {?}\n */\nHttpHeaders.prototype.lazyUpdate;\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\nimport {HttpHeaders} from './headers';\nimport {HttpParams} from './params';\n\n/**\n * Construction interface for `HttpRequest`s.\n *\n * All values are optional and will override default values if provided.\n */\ninterface HttpRequestInit {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer'|'blob'|'json'|'text';\n withCredentials?: boolean;\n}\n/**\n * Determine whether the given HTTP method may include a body.\n * @param {?} method\n * @return {?}\n */\nfunction mightHaveBody(method: string): boolean {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n}\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n * \n * In some execution environments ArrayBuffer is not defined.\n * @param {?} value\n * @return {?}\n */\nfunction isArrayBuffer(value: any): value is ArrayBuffer {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n/**\n * Safely assert whether the given value is a Blob.\n * \n * In some execution environments Blob is not defined.\n * @param {?} value\n * @return {?}\n */\nfunction isBlob(value: any): value is Blob {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n/**\n * Safely assert whether the given value is a FormData instance.\n * \n * In some execution environments FormData is not defined.\n * @param {?} value\n * @return {?}\n */\nfunction isFormData(value: any): value is FormData {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n/**\n * An outgoing HTTP request with an optional typed body.\n * \n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n * \n * \\@experimental\n */\nexport class HttpRequest<T> {\n/**\n * The request body, or `null` if one isn't set.\n * \n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\nreadonly body: T|null = null;\n/**\n * Outgoing headers for this request.\n */\nreadonly headers: HttpHeaders;\n/**\n * Whether this request should be made in a way that exposes progress events.\n * \n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n */\nreadonly reportProgress: boolean = false;\n/**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\nreadonly withCredentials: boolean = false;\n/**\n * The expected response type of the server.\n * \n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\nreadonly responseType: 'arraybuffer'|'blob'|'json'|'text' = 'json';\n/**\n * The outgoing HTTP request method.\n */\nreadonly method: string;\n/**\n * Outgoing URL parameters.\n */\nreadonly params: HttpParams;\n/**\n * The outgoing URL with all URL parameters set.\n */\nreadonly urlWithParams: string;\n/**\n * @param {?} method\n * @param {?} url\n * @param {?=} init\n */\nconstructor(method: 'DELETE'|'GET'|'HEAD'|'JSONP'|'OPTIONS', url: string, init?: {\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n });\n/**\n * @param {?} method\n * @param {?} url\n * @param {?} body\n * @param {?=} init\n */\nconstructor(method: 'POST'|'PUT'|'PATCH', url: string, body: T|null, init?: {\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n });\n/**\n * @param {?} method\n * @param {?} url\n * @param {?} body\n * @param {?=} init\n */\nconstructor(method: string, url: string, body: T|null, init?: {\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n });\n/**\n * @param {?} method\n * @param {?} url\n * @param {?=} third\n * @param {?=} fourth\n */\nconstructor(\n method: string, readonly url: string, third?: T|{\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n }|null,\n fourth?: {\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n }) {\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n let options: HttpRequestInit|undefined;\n\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = third as T || null;\n options = fourth;\n } else {\n // No body required, options are the third argument. The body stays null.\n options = third as HttpRequestInit;\n }\n\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n\n if (!!options.params) {\n this.params = options.params;\n }\n }\n\n // If no headers have been passed in, construct a new HttpHeaders instance.\n if (!this.headers) {\n this.headers = new HttpHeaders();\n }\n\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n } else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n const params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n } else {\n // Does the URL already have query parameters? Look for '?'.\n const qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n const sep: string = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n this.urlWithParams = url + sep + params;\n }\n }\n }\n/**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n * @return {?}\n */\nserializeBody(): ArrayBuffer|Blob|FormData|string|null {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return ( /** @type {?} */((this.body as any))).toString();\n }\n/**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n * \n * If no such type can be inferred, this method will return `null`.\n * @return {?}\n */\ndetectContentTypeHeader(): string|null {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n Array.isArray(this.body)) {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n }\n\n clone(): HttpRequest<T>;\n clone(update: {\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n body?: T|null,\n method?: string,\n url?: string,\n setHeaders?: {[name: string]: string | string[]},\n setParams?: {[param: string]: string},\n }): HttpRequest<T>;\n clone<V>(update: {\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n body?: V|null,\n method?: string,\n url?: string,\n setHeaders?: {[name: string]: string | string[]},\n setParams?: {[param: string]: string},\n }): HttpRequest<V>;\n/**\n * @param {?=} update\n * @return {?}\n */\nclone(update: {\n headers?: HttpHeaders,\n reportProgress?: boolean,\n params?: HttpParams,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n body?: any|null,\n method?: string,\n url?: string,\n setHeaders?: {[name: string]: string | string[]},\n setParams?: {[param: string]: string};\n } = {}): HttpRequest<any> {\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n const /** @type {?} */ method = update.method || this.method;\n const /** @type {?} */ url = update.url || this.url;\n const /** @type {?} */ responseType = update.responseType || this.responseType;\n\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n const /** @type {?} */ body = (update.body !== undefined) ? update.body : this.body;\n\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n const /** @type {?} */ withCredentials =\n (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n const /** @type {?} */ reportProgress =\n (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n let /** @type {?} */ headers = update.headers || this.headers;\n let /** @type {?} */ params = update.params || this.params;\n\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers =\n Object.keys(update.setHeaders)\n .reduce((headers, name) => headers.set(name, /** @type {?} */(( update.setHeaders))[name]), headers);\n }\n\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams)\n .reduce((params, param) => params.set(param, /** @type {?} */(( update.setParams))[param]), params);\n }\n\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(\n method, url, body, {\n params, headers, reportProgress, responseType, withCredentials,\n });\n }\n}\n\nfunction HttpRequest_tsickle_Closure_declarations() {\n/**\n * The request body, or `null` if one isn't set.\n * \n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n * @type {?}\n */\nHttpRequest.prototype.body;\n/**\n * Outgoing headers for this request.\n * @type {?}\n */\nHttpRequest.prototype.headers;\n/**\n * Whether this request should be made in a way that exposes progress events.\n * \n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n * @type {?}\n */\nHttpRequest.prototype.reportProgress;\n/**\n * Whether this request should be sent with outgoing credentials (cookies).\n * @type {?}\n */\nHttpRequest.prototype.withCredentials;\n/**\n * The expected response type of the server.\n * \n * This is used to parse the response appropriately before returning it to\n * the requestee.\n * @type {?}\n */\nHttpRequest.prototype.responseType;\n/**\n * The outgoing HTTP request method.\n * @type {?}\n */\nHttpRequest.prototype.method;\n/**\n * Outgoing URL parameters.\n * @type {?}\n */\nHttpRequest.prototype.params;\n/**\n * The outgoing URL with all URL parameters set.\n * @type {?}\n */\nHttpRequest.prototype.urlWithParams;\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\nimport {HttpHeaders} from './headers';\nexport type HttpEventType = number;\nexport let HttpEventType: any = {};\nHttpEventType.Sent = 0;\nHttpEventType.UploadProgress = 1;\nHttpEventType.ResponseHeader = 2;\nHttpEventType.DownloadProgress = 3;\nHttpEventType.Response = 4;\nHttpEventType.User = 5;\nHttpEventType[HttpEventType.Sent] = \"Sent\";\nHttpEventType[HttpEventType.UploadProgress] = \"UploadProgress\";\nHttpEventType[HttpEventType.ResponseHeader] = \"ResponseHeader\";\nHttpEventType[HttpEventType.DownloadProgress] = \"DownloadProgress\";\nHttpEventType[HttpEventType.Response] = \"Response\";\nHttpEventType[HttpEventType.User] = \"User\";\n\n\n/**\n * Base interface for progress events.\n *\n * @experimental\n */\nexport interface HttpProgressEvent {\n /**\n * Progress event type is either upload or download.\n */\n type: HttpEventType.DownloadProgress|HttpEventType.UploadProgress;\n\n /**\n * Number of bytes uploaded or downloaded.\n */\n loaded: number;\n\n /**\n * Total number of bytes to upload or download. Depending on the request or\n * response, this may not be computable and thus may not be present.\n */\n total?: number;\n}\n\n/**\n * A download progress event.\n *\n * @experimental\n */\nexport interface HttpDownloadProgressEvent extends HttpProgressEvent {\n type: HttpEventType.DownloadProgress;\n\n /**\n * The partial response body as downloaded so far.\n *\n * Only present if the responseType was `text`.\n */\n partialText?: string;\n}\n\n/**\n * An upload progress event.\n *\n * @experimental\n */\nexport interface HttpUploadProgressEvent extends HttpProgressEvent {\n type: HttpEventType.UploadProgress;\n}\n\n/**\n * An event indicating that the request was sent to the server. Useful\n * when a request may be retried multiple times, to distinguish between\n * retries on the final event stream.\n *\n * @experimental\n */\nexport interface HttpSentEvent { type: HttpEventType.Sent; }\n\n/**\n * A user-defined event.\n *\n * Grouping all custom events under this type ensures they will be handled\n * and forwarded by all implementations of interceptors.\n *\n * @experimental\n */\nexport interface HttpUserEvent<T> { type: HttpEventType.User; }\n\n/**\n * An error that represents a failed attempt to JSON.parse text coming back\n * from the server.\n *\n * It bundles the Error object with the actual response body that failed to parse.\n *\n * @experimental\n */\nexport interface HttpJsonParseError {\n error: Error;\n text: string;\n}\n\n/**\n * Union type for all possible events on the response stream.\n *\n * Typed according to the expected type of the response.\n *\n * @experimental\n */\nexport type HttpEvent<T> =\n HttpSentEvent | HttpHeaderResponse | HttpResponse<T>| HttpProgressEvent | HttpUserEvent<T>;\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n * \n * \\@experimental\n * @abstract\n */\nexport abstract class HttpResponseBase {\n/**\n * All response headers.\n */\nreadonly headers: HttpHeaders;\n/**\n * Response status code.\n */\nreadonly status: number;\n/**\n * Textual description of response status code.\n * \n * Do not depend on this.\n */\nreadonly statusText: string;\n/**\n * URL of the resource retrieved, or null if not available.\n */\nreadonly url: string|null;\n/**\n * Whether the status code falls in the 2xx range.\n */\nreadonly ok: boolean;\n/**\n * Type of the response, narrowed to either the full response or the header.\n */\nreadonly type: HttpEventType.Response|HttpEventType.ResponseHeader;\n/**\n * Super-constructor for all responses.\n * \n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n * @param {?} init\n * @param {?=} defaultStatus\n * @param {?=} defaultStatusText\n */\nconstructor(\n init: {\n headers?: HttpHeaders,\n status?: number,\n statusText?: string,\n url?: string,\n },\n defaultStatus: number = 200, defaultStatusText: string = 'OK') {\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n}\n\nfunction HttpResponseBase_tsickle_Closure_declarations() {\n/**\n * All response headers.\n * @type {?}\n */\nHttpResponseBase.prototype.headers;\n/**\n * Response status code.\n * @type {?}\n */\nHttpResponseBase.prototype.status;\n/**\n * Textual description of response status code.\n * \n * Do not depend on this.\n * @type {?}\n */\nHttpResponseBase.prototype.statusText;\n/**\n * URL of the resource retrieved, or null if not available.\n * @type {?}\n */\nHttpResponseBase.prototype.url;\n/**\n * Whether the status code falls in the 2xx range.\n * @type {?}\n */\nHttpResponseBase.prototype.ok;\n/**\n * Type of the response, narrowed to either the full response or the header.\n * @type {?}\n */\nHttpResponseBase.prototype.type;\n}\n\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n * \n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n * \n * \\@experimental\n */\nexport class HttpHeaderResponse extends HttpResponseBase {\n/**\n * Create a new `HttpHeaderResponse` with the given parameters.\n * @param {?=} init\n */\nconstructor(init: {\n headers?: HttpHeaders,\n status?: number,\n statusText?: string,\n url?: string,\n } = {}) {\n super(init);\n }\n\n readonly type: HttpEventType.ResponseHeader = HttpEventType.ResponseHeader;\n/**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n * @param {?=} update\n * @return {?}\n */\nclone(update: {headers?: HttpHeaders; status?: number; statusText?: string; url?: string;} = {}):\n HttpHeaderResponse {\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n\nfunction HttpHeaderResponse_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpHeaderResponse.prototype.type;\n}\n\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n * \n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n * \n * \\@experimental\n */\nexport class HttpResponse<T> extends HttpResponseBase {\n/**\n * The response body, or `null` if one was not returned.\n */\nreadonly body: T|null;\n/**\n * Construct a new `HttpResponse`.\n * @param {?=} init\n */\nconstructor(init: {\n body?: T | null, headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n } = {}) {\n super(init);\n this.body = init.body || null;\n }\n\n readonly type: HttpEventType.Response = HttpEventType.Response;\n\n clone(): HttpResponse<T>;\n clone(update: {headers?: HttpHeaders; status?: number; statusText?: string; url?: string;}):\n HttpResponse<T>;\n clone<V>(update: {\n body?: V | null, headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n }): HttpResponse<V>;\n/**\n * @param {?=} update\n * @return {?}\n */\nclone(update: {\n body?: any | null; headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n } = {}): HttpResponse<any> {\n return new HttpResponse<any>({\n body: (update.body !== undefined) ? update.body : this.body,\n headers: update.headers || this.headers,\n status: (update.status !== undefined) ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n\nfunction HttpResponse_tsickle_Closure_declarations() {\n/**\n * The response body, or `null` if one was not returned.\n * @type {?}\n */\nHttpResponse.prototype.body;\n/** @type {?} */\nHttpResponse.prototype.type;\n}\n\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n * \n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n * \n * \\@experimental\n */\nexport class HttpErrorResponse extends HttpResponseBase implements Error {\n readonly name = 'HttpErrorResponse';\n readonly message: string;\n readonly error: any|null;\n/**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\nreadonly ok = false;\n/**\n * @param {?} init\n */\nconstructor(init: {\n error?: any; headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n }) {\n // Initialize with a default status of 0 / Unknown Error.\n super(init, 0, 'Unknown Error');\n\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (this.status >= 200 && this.status < 300) {\n this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;\n } else {\n this.message =\n `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;\n }\n this.error = init.error || null;\n }\n}\n\nfunction HttpErrorResponse_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpErrorResponse.prototype.name;\n/** @type {?} */\nHttpErrorResponse.prototype.message;\n/** @type {?} */\nHttpErrorResponse.prototype.error;\n/**\n * Errors are never okay, even when the status code is in the 2xx success range.\n * @type {?}\n */\nHttpErrorResponse.prototype.ok;\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\nimport {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {of } from 'rxjs/observable/of';\nimport {concatMap} from 'rxjs/operator/concatMap';\nimport {filter} from 'rxjs/operator/filter';\nimport {map} from 'rxjs/operator/map';\n\nimport {HttpHandler} from './backend';\nimport {HttpHeaders} from './headers';\nimport {HttpParams} from './params';\nimport {HttpRequest} from './request';\nimport {HttpEvent, HttpResponse} from './response';\n/**\n * Construct an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. Basically, this clones the object and adds the body.\n * @template T\n * @param {?} options\n * @param {?} body\n * @return {?}\n */\nfunction addBody<T>(\n options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text',\n withCredentials?: boolean,\n },\n body: T | null): any {\n return {\n body,\n headers: options.headers,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n };\n}\n\n/**\n * @experimental\n */\nexport type HttpObserve = 'body' | 'events' | 'response';\n/**\n * Perform HTTP requests.\n * \n * `HttpClient` is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies according to which\n * signature is called (mainly the values of `observe` and `responseType`).\n * \n * \\@experimental\n */\nexport class HttpClient {\n/**\n * @param {?} handler\n */\nconstructor(private handler: HttpHandler) {}\n\n /**\n * Send the given `HttpRequest` and return a stream of `HttpEvents`.\n */\n request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;\n\n /**\n * Construct a request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<ArrayBuffer>;\n\n /**\n * Construct a request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct a request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n params?: HttpParams,\n observe: 'events', reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct a request which interprets the body as an `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct a request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct a request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n reportProgress?: boolean,\n observe: 'events', params?: HttpParams, responseType?: 'json', withCredentials?: boolean,\n }): Observable<HttpEvent<any>>;\n\n /**\n * Construct a request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `R`.\n */\n request<R>(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n reportProgress?: boolean,\n observe: 'events', params?: HttpParams, responseType?: 'json', withCredentials?: boolean,\n }): Observable<HttpEvent<R>>;\n\n /**\n * Construct a request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct a request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct a request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct a request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n request(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n reportProgress?: boolean,\n observe: 'response', params?: HttpParams, responseType?: 'json', withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct a request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `R`.\n */\n request<R>(method: string, url: string, options: {\n body?: any,\n headers?: HttpHeaders,\n reportProgress?: boolean,\n observe: 'response', params?: HttpParams, responseType?: 'json', withCredentials?: boolean,\n }): Observable<HttpResponse<R>>;\n\n /**\n * Construct a request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n request(method: string, url: string, options?: {\n body?: any,\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n responseType?: 'json',\n reportProgress?: boolean,\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct a request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `R`.\n */\n request<R>(method: string, url: string, options?: {\n body?: any,\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n responseType?: 'json',\n reportProgress?: boolean,\n withCredentials?: boolean,\n }): Observable<R>;\n\n /**\n * Construct a request in a manner where response type and requested `Observable` are not known\n * statically.\n *\n * @return an `Observable` of whatever was requested, typed to `any`.\n */\n request(method: string, url: string, options?: {\n body?: any,\n headers?: HttpHeaders,\n params?: HttpParams,\n observe?: HttpObserve,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n }): Observable<any>;\n/**\n * Constructs an `Observable` for a particular HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n * \n * This method can be called in one of two ways. Either an `HttpRequest`\n * instance can be passed directly as the only parameter, or a method can be\n * passed as the first parameter, a string URL as the second, and an\n * options hash as the third.\n * \n * If a `HttpRequest` object is passed directly, an `Observable` of the\n * raw `HttpEvent` stream will be returned.\n * \n * If a request is instead built by providing a URL, the options object\n * determines the return type of `request()`. In addition to configuring\n * request parameters such as the outgoing headers and/or the body, the options\n * hash specifies two key pieces of information about the request: the\n * `responseType` and what to `observe`.\n * \n * The `responseType` value determines how a successful response body will be\n * parsed. If `responseType` is the default `json`, a type interface for the\n * resulting object may be passed as a type parameter to `request()`.\n * \n * The `observe` value determines the return type of `request()`, based on what\n * the consumer is interested in observing. A value of `events` will return an\n * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,\n * including progress events by default. A value of `response` will return an\n * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`\n * depends on the `responseType` and any optionally provided type parameter.\n * A value of `body` will return an `Observable<T>` with the same `T` body type.\n * @param {?} first\n * @param {?=} url\n * @param {?=} options\n * @return {?}\n */\nrequest(first: string|HttpRequest<any>, url?: string, options: {\n body?: any,\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n let /** @type {?} */ req: HttpRequest<any>;\n // Firstly, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = /** @type {?} */(( first as HttpRequest<any>));\n } else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming GET unless a method is\n // provided.\n req = new HttpRequest(first, /** @type {?} */(( url)), options.body || null, {\n headers: options.headers,\n params: options.params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n });\n }\n\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n const /** @type {?} */ events$: Observable<HttpEvent<any>> =\n concatMap.call(of (req), (req: HttpRequest<any>) => this.handler.handle(req));\n\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n const /** @type {?} */ res$: Observable<HttpResponse<any>> =\n filter.call(events$, (event: HttpEvent<any>) => event instanceof HttpResponse);\n\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return map.call(res$, (res: HttpResponse<any>) => {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n });\n case 'blob':\n return map.call(res$, (res: HttpResponse<any>) => {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n });\n case 'text':\n return map.call(res$, (res: HttpResponse<any>) => {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n });\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return map.call(res$, (res: HttpResponse<any>) => res.body);\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);\n }\n }\n\n /**\n * Construct a DELETE request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<ArrayBuffer>;\n\n\n /**\n * Construct a DELETE request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a DELETE request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct a DELETE request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct a DELETE request which interprets the body as a `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct a DELETE request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct a DELETE request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<Object>>;\n\n /**\n * Construct a DELETE request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `T`.\n */\n delete<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<T>>;\n\n /**\n * Construct a DELETE request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct a DELETE request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct a DELETE request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct a DELETE request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n delete (url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct a DELETE request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `T`.\n */\n delete<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<T>>;\n\n /**\n * Construct a DELETE request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as an `Object`.\n */\n delete (url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct a DELETE request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as type `T`.\n */\n delete<T>(url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * DELETE request to be executed on the server. See the individual overloads for\n * details of `delete()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\ndelete (url: string, options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n return this.request<any>('DELETE', url, /** @type {?} */(( options as any)));\n }\n\n\n /**\n * Construct a GET request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<ArrayBuffer>;\n\n /**\n * Construct a GET request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a GET request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct a GET request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct a GET request which interprets the body as a `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct a GET request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct a GET request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<Object>>;\n\n /**\n * Construct a GET request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `T`.\n */\n get<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<T>>;\n\n /**\n * Construct a GET request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct a GET request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct a GET request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct a GET request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n get(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct a GET request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `T`.\n */\n get<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<T>>;\n\n /**\n * Construct a GET request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as an `Object`.\n */\n get(url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct a GET request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as type `T`.\n */\n get<T>(url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * GET request to be executed on the server. See the individual overloads for\n * details of `get()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\nget(url: string, options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n return this.request<any>('GET', url, /** @type {?} */(( options as any)));\n }\n\n\n /**\n * Construct a HEAD request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n\n /**\n * Construct a HEAD request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n }): Observable<ArrayBuffer>;\n head(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a HEAD request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct a GET request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct a HEAD request which interprets the body as a `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct a HEAD request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct a HEAD request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<Object>>;\n\n /**\n * Construct a HEAD request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `T`.\n */\n head<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<T>>;\n\n /**\n * Construct a HEAD request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct a HEAD request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct a HEAD request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct a HEAD request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n head(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct a HEAD request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `T`.\n */\n head<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<T>>;\n\n /**\n * Construct a HEAD request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as an `Object`.\n */\n head(url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct a HEAD request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as type `T`.\n */\n head<T>(url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * HEAD request to be executed on the server. See the individual overloads for\n * details of `head()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\nhead(url: string, options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n return this.request<any>('HEAD', url, /** @type {?} */(( options as any)));\n }\n\n /**\n * Construct a JSONP request for the given URL and name of the callback parameter.\n *\n * @return an `Observable` of the response object as an `Object`\n */\n jsonp(url: string, callbackParam: string): Observable<Object>;\n\n /**\n * Construct a JSONP request for the given URL and name of the callback parameter.\n *\n * @return an `Observable` of the response object as type `T`.\n */\n jsonp<T>(url: string, callbackParam: string): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause a request\n * with the special method `JSONP` to be dispatched via the interceptor pipeline.\n * \n * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).\n * If no such interceptor is reached, then the `JSONP` request will likely be\n * rejected by the configured backend.\n * @template T\n * @param {?} url\n * @param {?} callbackParam\n * @return {?}\n */\njsonp<T>(url: string, callbackParam: string): Observable<T> {\n return this.request<any>('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n }\n\n /**\n * Make an OPTIONS request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<ArrayBuffer>;\n\n /**\n * Construct an OPTIONS request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a OPTIONS request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct an OPTIONS request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as a `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<Object>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `T`.\n */\n options<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<T>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n options(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `T`.\n */\n options<T>(url: string, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<T>>;\n\n /**\n * Construct an OPTIONS request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as an `Object`.\n */\n options(url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct an OPTIONS request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as type `T`.\n */\n options<T>(url: string, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * OPTIONS request to be executed on the server. See the individual overloads for\n * details of `options()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\noptions(url: string, options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n return this.request<any>('OPTIONS', url, /** @type {?} */(( options as any)));\n }\n\n /**\n * Construct a PATCH request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<ArrayBuffer>;\n\n /**\n * Construct a PATCH request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a PATCH request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct a PATCH request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct a PATCH request which interprets the body as a `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct a PATCH request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct a PATCH request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<Object>>;\n\n /**\n * Construct a PATCH request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `T`.\n */\n patch<T>(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<T>>;\n\n /**\n * Construct a PATCH request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct a PATCH request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct a PATCH request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct a PATCH request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n patch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct a PATCH request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `T`.\n */\n patch<T>(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<T>>;\n\n /**\n * Construct a PATCH request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as an `Object`.\n */\n patch(url: string, body: any|null, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct a PATCH request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as type `T`.\n */\n patch<T>(url: string, body: any|null, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * PATCH request to be executed on the server. See the individual overloads for\n * details of `patch()`'s return type based on the provided options.\n * @param {?} url\n * @param {?} body\n * @param {?=} options\n * @return {?}\n */\npatch(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n return this.request<any>('PATCH', url, addBody(options, body));\n }\n\n /**\n * Construct a POST request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<ArrayBuffer>;\n\n /**\n * Construct a POST request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a POST request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct a PATCH request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct a POST request which interprets the body as a `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct a POST request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct a POST request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<Object>>;\n\n /**\n * Construct a POST request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `T`.\n */\n post<T>(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<T>>;\n\n /**\n * Construct a POST request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct a POST request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct a POST request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct a POST request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n post(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct a POST request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `T`.\n */\n post<T>(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<T>>;\n\n /**\n * Construct a POST request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as an `Object`.\n */\n post(url: string, body: any|null, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct a POST request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as type `T`.\n */\n post<T>(url: string, body: any|null, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n * @param {?} url\n * @param {?} body\n * @param {?=} options\n * @return {?}\n */\npost(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n return this.request<any>('POST', url, addBody(options, body));\n }\n\n /**\n * Construct a PUT request which interprets the body as an `ArrayBuffer` and returns it.\n *\n * @return an `Observable` of the body as an `ArrayBuffer`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<ArrayBuffer>;\n\n /**\n * Construct a PUT request which interprets the body as a `Blob` and returns it.\n *\n * @return an `Observable` of the body as a `Blob`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<Blob>;\n\n /**\n * Construct a PUT request which interprets the body as text and returns it.\n *\n * @return an `Observable` of the body as a `string`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<string>;\n\n /**\n * Construct a PUT request which interprets the body as an `ArrayBuffer` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `ArrayBuffer`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Construct a PUT request which interprets the body as a `Blob` and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Blob`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpEvent<Blob>>;\n\n /**\n * Construct a PUT request which interprets the body as text and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `string`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpEvent<string>>;\n\n /**\n * Construct a PUT request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `Object`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpEvent<Object>>;\n\n /**\n * Construct a PUT request which interprets the body as JSON and returns the full event stream.\n *\n * @return an `Observable` of all `HttpEvent`s for the request, with a body type of `T`.\n */\n put<T>(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'events', responseType?: 'json', withCredentials?: boolean,\n }): Observable<HttpEvent<T>>;\n\n /**\n * Construct a PUT request which interprets the body as an `ArrayBuffer` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `ArrayBuffer`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'arraybuffer', withCredentials?: boolean,\n }): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Construct a PUT request which interprets the body as a `Blob` and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Blob`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'blob', withCredentials?: boolean,\n }): Observable<HttpResponse<Blob>>;\n\n /**\n * Construct a PUT request which interprets the body as text and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `string`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response', params?: HttpParams, reportProgress?: boolean,\n responseType: 'text', withCredentials?: boolean,\n }): Observable<HttpResponse<string>>;\n\n /**\n * Construct a PUT request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `Object`.\n */\n put(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<Object>>;\n\n /**\n * Construct a PUT request which interprets the body as JSON and returns the full response.\n *\n * @return an `Observable` of the `HttpResponse` for the request, with a body type of `T`.\n */\n put<T>(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe: 'response',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<HttpResponse<T>>;\n\n /**\n * Construct a PUT request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as an `Object`.\n */\n put(url: string, body: any|null, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<Object>;\n\n /**\n * Construct a PUT request which interprets the body as JSON and returns it.\n *\n * @return an `Observable` of the body as type `T`.\n */\n put<T>(url: string, body: any|null, options?: {\n headers?: HttpHeaders,\n observe?: 'body',\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'json',\n withCredentials?: boolean,\n }): Observable<T>;\n/**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n * @param {?} url\n * @param {?} body\n * @param {?=} options\n * @return {?}\n */\nput(url: string, body: any|null, options: {\n headers?: HttpHeaders,\n observe?: HttpObserve,\n params?: HttpParams,\n reportProgress?: boolean,\n responseType?: 'arraybuffer'|'blob'|'json'|'text',\n withCredentials?: boolean,\n } = {}): Observable<any> {\n return this.request<any>('PUT', url, addBody(options, body));\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: HttpHandler, },\n];\n}\n\nfunction HttpClient_tsickle_Closure_declarations() {\n/** @type {?} */\nHttpClient.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nHttpClient.ctorParameters;\n/** @type {?} */\nHttpClient.prototype.handler;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"],"names":["HttpXsrfCookieExtractor","doc","platform","cookieName","this","lastCookieString","lastToken","parseCount","prototype","getToken","cookieString","cookie","type","_angular_core","Injectable","undefined","decorators","Inject","args","XSRF_COOKIE_NAME","next","handle","req","token","tokenService","clone","headers","set","headerName","options","ngModule","HttpClientXsrfModule","providers","provide","useValue","XSRF_HEADER_NAME","HTTP_INTERCEPTORS","useExisting","HttpXsrfInterceptor","multi","HttpXsrfTokenExtractor","useClass","HttpClientModule","imports","withOptions","HttpClient","HttpHandler","HttpXhrBackend","HttpBackend","HttpClientJsonpModule","BrowserXhr","build","XMLHttpRequest","_this","rxjs_Observable","Observable","observer","xhr","withCredentials","has","headerResponse","onLoad","_a","partialFromXhr","status","statusText","url","body","response","responseText","ok","responseType","error","JSON","parse","HttpResponse","onDownProgress","event","sentHeaders","HttpEventType","DownloadProgress","loaded","progressEvent","total","onUpProgress","UploadProgress","lengthComputable","addEventListener","reportProgress","upload","Sent","removeEventListener","onError","reqBody","abort","node","document","createElement","callbackMap","callback","data","cancelled","parentNode","removeChild","cleanup","finished","HttpErrorResponse","complete","JsonpInterceptor","intercept","HttpUrlEncodingCodec","encodeKey","k","standardEncoding","encodeValue","v","HttpParams","toString","eKey","encoder","key","update","init","map","Map","cloneFrom","keys","forEach","get","op","base","param","push","value","delete","base_1","idx","indexOf","splice","length","HttpHeaders","normalizedNames","lazyUpdate","lazyInit","split","line","index","name","slice","toLowerCase","trim","maybeSetNormalizedName","Object","values","copyFrom","other","applyUpdate","apply","toDelete_1","existing","filter","mightHaveBody","method","fourth","third","params","isArrayBuffer","isBlob","isFormData","Array","isArray","setHeaders","reduce","setParams","HttpResponseBase","defaultStatus","defaultStatusText","HttpHeaderResponse","_super","call","message","request","first","HttpRequest","events$","rxjs_operator_concatMap","concatMap","rxjs_observable_of","of","handler","rxjs_operator_map","res$","res","ArrayBuffer","Error","Blob","put","addBody","paramParser","rawParams","codec","map$$1","eqIdx","list","val","encodeURIComponent"],"mappings":"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"}
|