New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@angular/http

Package Overview
Dependencies
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/http - npm Package Compare versions

Comparing version 4.0.0-beta.3 to 4.0.0-beta.4

2

bundles/http-testing.umd.js
/**
* @license Angular v4.0.0-beta.3
* @license Angular v4.0.0-beta.4
* (c) 2010-2016 Google, Inc. https://angular.io/

@@ -4,0 +4,0 @@ * License: MIT

/**
* @license Angular v4.0.0-beta.3
* @license Angular v4.0.0-beta.4
* (c) 2010-2016 Google, Inc. https://angular.io/

@@ -7,10 +7,10 @@ * License: MIT

!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("rxjs/Observable"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs/Observable","@angular/platform-browser"],factory):factory((global.ng=global.ng||{},global.ng.http=global.ng.http||{}),global.ng.core,global.Rx,global.ng.platformBrowser)}(this,function(exports,_angular_core,rxjs_Observable,_angular_platformBrowser){"use strict";function normalizeMethodName(method){if("string"!=typeof method)return method;switch(method.toUpperCase()){case"GET":return RequestMethod.Get;case"POST":return RequestMethod.Post;case"PUT":return RequestMethod.Put;case"DELETE":return RequestMethod.Delete;case"OPTIONS":return RequestMethod.Options;case"HEAD":return RequestMethod.Head;case"PATCH":return RequestMethod.Patch}throw new Error('Invalid request method. The method "'+method+'" is not supported.')}function getResponseURL(xhr){return"responseURL"in xhr?xhr.responseURL:/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())?xhr.getResponseHeader("X-Request-URL"):void 0}function stringToArrayBuffer(input){for(var view=new Uint16Array(input.length),i=0,strLen=input.length;i<strLen;i++)view[i]=input.charCodeAt(i);return view.buffer}/**
* @license undefined
* Copyright Google Inc. All Rights Reserved.
* *
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @param {?=} rawParams
* @return {?}
*/
function paramParser(rawParams){void 0===rawParams&&(rawParams="");var map=new Map;if(rawParams.length>0){var params=rawParams.split("&");params.forEach(function(param){var eqIdx=param.indexOf("="),_a=eqIdx==-1?[param,""]:[param.slice(0,eqIdx),param.slice(eqIdx+1)],key=_a[0],val=_a[1],list=map.get(key)||[];list.push(val),map.set(key,list)})}return map}function standardEncoding(v){return encodeURIComponent(v).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}function _getJsonpConnections(){var w="object"==typeof window?window:{};return null===_jsonpConnections&&(_jsonpConnections=w[JSONP_HOME]={}),_jsonpConnections}function httpRequest(backend,request){return backend.createConnection(request).response}function mergeOptions(defaultOpts,providedOpts,method,url){var newOptions=defaultOpts;return providedOpts?newOptions.merge(new RequestOptions({method:providedOpts.method||method,url:providedOpts.url||url,search:providedOpts.search,headers:providedOpts.headers,body:providedOpts.body,withCredentials:providedOpts.withCredentials,responseType:providedOpts.responseType})):newOptions.merge(new RequestOptions({method:method,url:url}))}function _createDefaultCookieXSRFStrategy(){return new CookieXSRFStrategy}function httpFactory(xhrBackend,requestOptions){return new Http(xhrBackend,requestOptions)}function jsonpFactory(jsonpBackend,requestOptions){return new Jsonp(jsonpBackend,requestOptions)}var BrowserXhr=function(){function BrowserXhr(){}return BrowserXhr.prototype.build=function(){return new XMLHttpRequest},BrowserXhr.decorators=[{type:_angular_core.Injectable}],BrowserXhr.ctorParameters=function(){return[]},BrowserXhr}(),RequestMethod={};RequestMethod.Get=0,RequestMethod.Post=1,RequestMethod.Put=2,RequestMethod.Delete=3,RequestMethod.Options=4,RequestMethod.Head=5,RequestMethod.Patch=6,RequestMethod[RequestMethod.Get]="Get",RequestMethod[RequestMethod.Post]="Post",RequestMethod[RequestMethod.Put]="Put",RequestMethod[RequestMethod.Delete]="Delete",RequestMethod[RequestMethod.Options]="Options",RequestMethod[RequestMethod.Head]="Head",RequestMethod[RequestMethod.Patch]="Patch";var ReadyState={};ReadyState.Unsent=0,ReadyState.Open=1,ReadyState.HeadersReceived=2,ReadyState.Loading=3,ReadyState.Done=4,ReadyState.Cancelled=5,ReadyState[ReadyState.Unsent]="Unsent",ReadyState[ReadyState.Open]="Open",ReadyState[ReadyState.HeadersReceived]="HeadersReceived",ReadyState[ReadyState.Loading]="Loading",ReadyState[ReadyState.Done]="Done",ReadyState[ReadyState.Cancelled]="Cancelled";var ResponseType={};ResponseType.Basic=0,ResponseType.Cors=1,ResponseType.Default=2,ResponseType.Error=3,ResponseType.Opaque=4,ResponseType[ResponseType.Basic]="Basic",ResponseType[ResponseType.Cors]="Cors",ResponseType[ResponseType.Default]="Default",ResponseType[ResponseType.Error]="Error",ResponseType[ResponseType.Opaque]="Opaque";var ContentType={};ContentType.NONE=0,ContentType.JSON=1,ContentType.FORM=2,ContentType.FORM_DATA=3,ContentType.TEXT=4,ContentType.BLOB=5,ContentType.ARRAY_BUFFER=6,ContentType[ContentType.NONE]="NONE",ContentType[ContentType.JSON]="JSON",ContentType[ContentType.FORM]="FORM",ContentType[ContentType.FORM_DATA]="FORM_DATA",ContentType[ContentType.TEXT]="TEXT",ContentType[ContentType.BLOB]="BLOB",ContentType[ContentType.ARRAY_BUFFER]="ARRAY_BUFFER";var ResponseContentType={};ResponseContentType.Text=0,ResponseContentType.Json=1,ResponseContentType.ArrayBuffer=2,ResponseContentType.Blob=3,ResponseContentType[ResponseContentType.Text]="Text",ResponseContentType[ResponseContentType.Json]="Json",ResponseContentType[ResponseContentType.ArrayBuffer]="ArrayBuffer",ResponseContentType[ResponseContentType.Blob]="Blob";var Headers=function(){function Headers(headers){var _this=this;if(this._headers=new Map,this._normalizedNames=new Map,headers)return headers instanceof Headers?void headers.forEach(function(values,name){values.forEach(function(value){return _this.append(name,value)})}):void Object.keys(headers).forEach(function(name){var values=Array.isArray(headers[name])?headers[name]:[headers[name]];_this.delete(name),values.forEach(function(value){return _this.append(name,value)})})}return Headers.fromResponseHeaderString=function(headersString){var headers=new Headers;return headersString.split("\n").forEach(function(line){var index=line.indexOf(":");if(index>0){var name_1=line.slice(0,index),value=line.slice(index+1).trim();headers.set(name_1,value)}}),headers},Headers.prototype.append=function(name,value){var values=this.getAll(name);null===values?this.set(name,value):values.push(value)},Headers.prototype.delete=function(name){var lcName=name.toLowerCase();this._normalizedNames.delete(lcName),this._headers.delete(lcName)},Headers.prototype.forEach=function(fn){var _this=this;this._headers.forEach(function(values,lcName){return fn(values,_this._normalizedNames.get(lcName),_this._headers)})},Headers.prototype.get=function(name){var values=this.getAll(name);return null===values?null:values.length>0?values[0]:null},Headers.prototype.has=function(name){return this._headers.has(name.toLowerCase())},Headers.prototype.keys=function(){return Array.from(this._normalizedNames.values())},Headers.prototype.set=function(name,value){Array.isArray(value)?value.length&&this._headers.set(name.toLowerCase(),[value.join(",")]):this._headers.set(name.toLowerCase(),[value]),this.mayBeSetNormalizedName(name)},Headers.prototype.values=function(){return Array.from(this._headers.values())},Headers.prototype.toJSON=function(){var _this=this,serialized={};return this._headers.forEach(function(values,name){var split=[];values.forEach(function(v){return split.push.apply(split,v.split(","))}),serialized[_this._normalizedNames.get(name)]=split}),serialized},Headers.prototype.getAll=function(name){return this.has(name)?this._headers.get(name.toLowerCase()):null},Headers.prototype.entries=function(){throw new Error('"entries" method is not implemented on Headers class')},Headers.prototype.mayBeSetNormalizedName=function(name){var lcName=name.toLowerCase();this._normalizedNames.has(lcName)||this._normalizedNames.set(lcName,name)},Headers}(),__extends$1=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},ResponseOptions=function(){function ResponseOptions(_a){var _b=void 0===_a?{}:_a,body=_b.body,status=_b.status,headers=_b.headers,statusText=_b.statusText,type=_b.type,url=_b.url;this.body=null!=body?body:null,this.status=null!=status?status:null,this.headers=null!=headers?headers:null,this.statusText=null!=statusText?statusText:null,this.type=null!=type?type:null,this.url=null!=url?url:null}return ResponseOptions.prototype.merge=function(options){return new ResponseOptions({body:options&&null!=options.body?options.body:this.body,status:options&&null!=options.status?options.status:this.status,headers:options&&null!=options.headers?options.headers:this.headers,statusText:options&&null!=options.statusText?options.statusText:this.statusText,type:options&&null!=options.type?options.type:this.type,url:options&&null!=options.url?options.url:this.url})},ResponseOptions}(),BaseResponseOptions=function(_super){function BaseResponseOptions(){_super.call(this,{status:200,statusText:"Ok",type:ResponseType.Default,headers:new Headers})}return __extends$1(BaseResponseOptions,_super),BaseResponseOptions.decorators=[{type:_angular_core.Injectable}],BaseResponseOptions.ctorParameters=function(){return[]},BaseResponseOptions}(ResponseOptions),ConnectionBackend=function(){function ConnectionBackend(){}return ConnectionBackend.prototype.createConnection=function(request){},ConnectionBackend}(),Connection=function(){function Connection(){}return Connection}(),XSRFStrategy=function(){function XSRFStrategy(){}return XSRFStrategy.prototype.configureRequest=function(req){},XSRFStrategy}(),isSuccess=function(status){return status>=200&&status<300},QueryEncoder=function(){function QueryEncoder(){}return QueryEncoder.prototype.encodeKey=function(k){return standardEncoding(k)},QueryEncoder.prototype.encodeValue=function(v){return standardEncoding(v)},QueryEncoder}(),URLSearchParams=function(){function URLSearchParams(rawParams,queryEncoder){void 0===rawParams&&(rawParams=""),void 0===queryEncoder&&(queryEncoder=new QueryEncoder),this.rawParams=rawParams,this.queryEncoder=queryEncoder,this.paramsMap=paramParser(rawParams)}return URLSearchParams.prototype.clone=function(){var clone=new URLSearchParams("",this.queryEncoder);return clone.appendAll(this),clone},URLSearchParams.prototype.has=function(param){return this.paramsMap.has(param)},URLSearchParams.prototype.get=function(param){var storedParam=this.paramsMap.get(param);return Array.isArray(storedParam)?storedParam[0]:null},URLSearchParams.prototype.getAll=function(param){return this.paramsMap.get(param)||[]},URLSearchParams.prototype.set=function(param,val){if(void 0===val||null===val)return void this.delete(param);var list=this.paramsMap.get(param)||[];list.length=0,list.push(val),this.paramsMap.set(param,list)},URLSearchParams.prototype.setAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var list=_this.paramsMap.get(param)||[];list.length=0,list.push(value[0]),_this.paramsMap.set(param,list)})},URLSearchParams.prototype.append=function(param,val){if(void 0!==val&&null!==val){var list=this.paramsMap.get(param)||[];list.push(val),this.paramsMap.set(param,list)}},URLSearchParams.prototype.appendAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){for(var list=_this.paramsMap.get(param)||[],i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.replaceAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var list=_this.paramsMap.get(param)||[];list.length=0;for(var i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.toString=function(){var _this=this,paramsList=[];return this.paramsMap.forEach(function(values,k){values.forEach(function(v){return paramsList.push(_this.queryEncoder.encodeKey(k)+"="+_this.queryEncoder.encodeValue(v))})}),paramsList.join("&")},URLSearchParams.prototype.delete=function(param){this.paramsMap.delete(param)},URLSearchParams}(),Body=function(){function Body(){}return Body.prototype.json=function(){return"string"==typeof this._body?JSON.parse(this._body):this._body instanceof ArrayBuffer?JSON.parse(this.text()):this._body},Body.prototype.text=function(){return this._body instanceof URLSearchParams?this._body.toString():this._body instanceof ArrayBuffer?String.fromCharCode.apply(null,new Uint16Array(this._body)):null==this._body?"":"object"==typeof this._body?JSON.stringify(this._body,null,2):this._body.toString()},Body.prototype.arrayBuffer=function(){return this._body instanceof ArrayBuffer?this._body:stringToArrayBuffer(this.text())},Body.prototype.blob=function(){if(this._body instanceof Blob)return this._body;if(this._body instanceof ArrayBuffer)return new Blob([this._body]);throw new Error("The request body isn't either a blob or an array buffer")},Body}(),__extends$2=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},Response=function(_super){function Response(responseOptions){_super.call(this),this._body=responseOptions.body,this.status=responseOptions.status,this.ok=this.status>=200&&this.status<=299,this.statusText=responseOptions.statusText,this.headers=responseOptions.headers,this.type=responseOptions.type,this.url=responseOptions.url}return __extends$2(Response,_super),Response.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},Response}(Body),_nextRequestId=0,JSONP_HOME="__ng_jsonp__",_jsonpConnections=null,BrowserJsonp=function(){function BrowserJsonp(){}return BrowserJsonp.prototype.build=function(url){var node=document.createElement("script");return node.src=url,node},BrowserJsonp.prototype.nextRequestID=function(){return"__req"+_nextRequestId++},BrowserJsonp.prototype.requestCallback=function(id){return JSONP_HOME+"."+id+".finished"},BrowserJsonp.prototype.exposeConnection=function(id,connection){var connections=_getJsonpConnections();connections[id]=connection},BrowserJsonp.prototype.removeConnection=function(id){var connections=_getJsonpConnections();connections[id]=null},BrowserJsonp.prototype.send=function(node){document.body.appendChild(node)},BrowserJsonp.prototype.cleanup=function(node){node.parentNode&&node.parentNode.removeChild(node)},BrowserJsonp.decorators=[{type:_angular_core.Injectable}],BrowserJsonp.ctorParameters=function(){return[]},BrowserJsonp}(),__extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},JSONP_ERR_NO_CALLBACK="JSONP injected script did not invoke callback.",JSONP_ERR_WRONG_METHOD="JSONP requests must use GET request method.",JSONPConnection=function(){function JSONPConnection(){}return JSONPConnection.prototype.finished=function(data){},JSONPConnection}(),JSONPConnection_=function(_super){function JSONPConnection_(req,_dom,baseResponseOptions){var _this=this;if(_super.call(this),this._dom=_dom,this.baseResponseOptions=baseResponseOptions,this._finished=!1,req.method!==RequestMethod.Get)throw new TypeError(JSONP_ERR_WRONG_METHOD);this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){_this.readyState=ReadyState.Loading;var id=_this._id=_dom.nextRequestID();_dom.exposeConnection(id,_this);var callback=_dom.requestCallback(_this._id),url=req.url;url.indexOf("=JSONP_CALLBACK&")>-1?url=url.replace("=JSONP_CALLBACK&","="+callback+"&"):url.lastIndexOf("=JSONP_CALLBACK")===url.length-"=JSONP_CALLBACK".length&&(url=url.substring(0,url.length-"=JSONP_CALLBACK".length)+("="+callback));var script=_this._script=_dom.build(url),onLoad=function(event){if(_this.readyState!==ReadyState.Cancelled){if(_this.readyState=ReadyState.Done,_dom.cleanup(script),!_this._finished){var responseOptions_1=new ResponseOptions({body:JSONP_ERR_NO_CALLBACK,type:ResponseType.Error,url:url});return baseResponseOptions&&(responseOptions_1=baseResponseOptions.merge(responseOptions_1)),void responseObserver.error(new Response(responseOptions_1))}var responseOptions=new ResponseOptions({body:_this._responseData,url:url});_this.baseResponseOptions&&(responseOptions=_this.baseResponseOptions.merge(responseOptions)),responseObserver.next(new Response(responseOptions)),responseObserver.complete()}},onError=function(error){if(_this.readyState!==ReadyState.Cancelled){_this.readyState=ReadyState.Done,_dom.cleanup(script);var responseOptions=new ResponseOptions({body:error.message,type:ResponseType.Error});baseResponseOptions&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))}};return script.addEventListener("load",onLoad),script.addEventListener("error",onError),_dom.send(script),function(){_this.readyState=ReadyState.Cancelled,script.removeEventListener("load",onLoad),script.removeEventListener("error",onError),_this._dom.cleanup(script)}})}return __extends(JSONPConnection_,_super),JSONPConnection_.prototype.finished=function(data){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==ReadyState.Cancelled&&(this._responseData=data)},JSONPConnection_}(JSONPConnection),JSONPBackend=function(_super){function JSONPBackend(){_super.apply(this,arguments)}return __extends(JSONPBackend,_super),JSONPBackend}(ConnectionBackend),JSONPBackend_=function(_super){function JSONPBackend_(_browserJSONP,_baseResponseOptions){_super.call(this),this._browserJSONP=_browserJSONP,this._baseResponseOptions=_baseResponseOptions}return __extends(JSONPBackend_,_super),JSONPBackend_.prototype.createConnection=function(request){return new JSONPConnection_(request,this._browserJSONP,this._baseResponseOptions)},JSONPBackend_.decorators=[{type:_angular_core.Injectable}],JSONPBackend_.ctorParameters=function(){return[{type:BrowserJsonp},{type:ResponseOptions}]},JSONPBackend_}(JSONPBackend),XSSI_PREFIX=/^\)\]\}',?\n/,XHRConnection=function(){function XHRConnection(req,browserXHR,baseResponseOptions){var _this=this;this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){var _xhr=browserXHR.build();_xhr.open(RequestMethod[req.method].toUpperCase(),req.url),null!=req.withCredentials&&(_xhr.withCredentials=req.withCredentials);var onLoad=function(){var status=1223===_xhr.status?204:_xhr.status,body=null;204!==status&&(body="undefined"==typeof _xhr.response?_xhr.responseText:_xhr.response,"string"==typeof body&&(body=body.replace(XSSI_PREFIX,""))),0===status&&(status=body?200:0);var headers=Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders()),url=getResponseURL(_xhr)||req.url,statusText=_xhr.statusText||"OK",responseOptions=new ResponseOptions({body:body,status:status,headers:headers,statusText:statusText,url:url});null!=baseResponseOptions&&(responseOptions=baseResponseOptions.merge(responseOptions));var response=new Response(responseOptions);return response.ok=isSuccess(status),response.ok?(responseObserver.next(response),void responseObserver.complete()):void responseObserver.error(response)},onError=function(err){var responseOptions=new ResponseOptions({body:err,type:ResponseType.Error,status:_xhr.status,statusText:_xhr.statusText});null!=baseResponseOptions&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))};if(_this.setDetectedContentType(req,_xhr),null==req.headers&&(req.headers=new Headers),req.headers.has("Accept")||req.headers.append("Accept","application/json, text/plain, */*"),req.headers.forEach(function(values,name){return _xhr.setRequestHeader(name,values.join(","))}),null!=req.responseType&&null!=_xhr.responseType)switch(req.responseType){case ResponseContentType.ArrayBuffer:_xhr.responseType="arraybuffer";break;case ResponseContentType.Json:_xhr.responseType="json";break;case ResponseContentType.Text:_xhr.responseType="text";break;case ResponseContentType.Blob:_xhr.responseType="blob";break;default:throw new Error("The selected responseType is not supported")}return _xhr.addEventListener("load",onLoad),_xhr.addEventListener("error",onError),_xhr.send(_this.request.getBody()),function(){_xhr.removeEventListener("load",onLoad),_xhr.removeEventListener("error",onError),_xhr.abort()}})}return XHRConnection.prototype.setDetectedContentType=function(req,_xhr){if(null==req.headers||null==req.headers.get("Content-Type"))switch(req.contentType){case ContentType.NONE:break;case ContentType.JSON:_xhr.setRequestHeader("content-type","application/json");break;case ContentType.FORM:_xhr.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");break;case ContentType.TEXT:_xhr.setRequestHeader("content-type","text/plain");break;case ContentType.BLOB:var blob=req.blob();blob.type&&_xhr.setRequestHeader("content-type",blob.type)}},XHRConnection}(),CookieXSRFStrategy=function(){function CookieXSRFStrategy(_cookieName,_headerName){void 0===_cookieName&&(_cookieName="XSRF-TOKEN"),void 0===_headerName&&(_headerName="X-XSRF-TOKEN"),this._cookieName=_cookieName,this._headerName=_headerName}return CookieXSRFStrategy.prototype.configureRequest=function(req){var xsrfToken=_angular_platformBrowser.__platform_browser_private__.getDOM().getCookie(this._cookieName);xsrfToken&&req.headers.set(this._headerName,xsrfToken)},CookieXSRFStrategy}(),XHRBackend=function(){function XHRBackend(_browserXHR,_baseResponseOptions,_xsrfStrategy){this._browserXHR=_browserXHR,this._baseResponseOptions=_baseResponseOptions,this._xsrfStrategy=_xsrfStrategy}return XHRBackend.prototype.createConnection=function(request){return this._xsrfStrategy.configureRequest(request),new XHRConnection(request,this._browserXHR,this._baseResponseOptions)},XHRBackend.decorators=[{type:_angular_core.Injectable}],XHRBackend.ctorParameters=function(){return[{type:BrowserXhr},{type:ResponseOptions},{type:XSRFStrategy}]},XHRBackend}(),__extends$3=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},RequestOptions=function(){function RequestOptions(_a){var _b=void 0===_a?{}:_a,method=_b.method,headers=_b.headers,body=_b.body,url=_b.url,search=_b.search,params=_b.params,withCredentials=_b.withCredentials,responseType=_b.responseType;this.method=null!=method?normalizeMethodName(method):null,this.headers=null!=headers?headers:null,this.body=null!=body?body:null,this.url=null!=url?url:null,this.params=this._mergeSearchParams(params||search),this.withCredentials=null!=withCredentials?withCredentials:null,this.responseType=null!=responseType?responseType:null}return Object.defineProperty(RequestOptions.prototype,"search",{get:function(){return this.params},set:function(params){this.params=params},enumerable:!0,configurable:!0}),RequestOptions.prototype.merge=function(options){return new RequestOptions({method:options&&null!=options.method?options.method:this.method,headers:options&&null!=options.headers?options.headers:new Headers(this.headers),body:options&&null!=options.body?options.body:this.body,url:options&&null!=options.url?options.url:this.url,params:options&&this._mergeSearchParams(options.params||options.search),withCredentials:options&&null!=options.withCredentials?options.withCredentials:this.withCredentials,responseType:options&&null!=options.responseType?options.responseType:this.responseType})},RequestOptions.prototype._mergeSearchParams=function(params){return params?params instanceof URLSearchParams?params.clone():"string"==typeof params?new URLSearchParams(params):this._parseParams(params):this.params},RequestOptions.prototype._parseParams=function(objParams){var _this=this;void 0===objParams&&(objParams={});var params=new URLSearchParams;return Object.keys(objParams).forEach(function(key){var value=objParams[key];Array.isArray(value)?value.forEach(function(item){return _this._appendParam(key,item,params)}):_this._appendParam(key,value,params)}),params},RequestOptions.prototype._appendParam=function(key,value,params){"string"!=typeof value&&(value=JSON.stringify(value)),params.append(key,value)},RequestOptions}(),BaseRequestOptions=function(_super){function BaseRequestOptions(){_super.call(this,{method:RequestMethod.Get,headers:new Headers})}return __extends$3(BaseRequestOptions,_super),BaseRequestOptions.decorators=[{type:_angular_core.Injectable}],BaseRequestOptions.ctorParameters=function(){return[]},BaseRequestOptions}(RequestOptions),__extends$5=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},Request=function(_super){function Request(requestOptions){_super.call(this);var url=requestOptions.url;if(this.url=requestOptions.url,requestOptions.params){var params=requestOptions.params.toString();if(params.length>0){var prefix="?";this.url.indexOf("?")!=-1&&(prefix="&"==this.url[this.url.length-1]?"":"&"),this.url=url+prefix+params}}this._body=requestOptions.body,this.method=normalizeMethodName(requestOptions.method),this.headers=new Headers(requestOptions.headers),this.contentType=this.detectContentType(),this.withCredentials=requestOptions.withCredentials,this.responseType=requestOptions.responseType}return __extends$5(Request,_super),Request.prototype.detectContentType=function(){switch(this.headers.get("content-type")){case"application/json":return ContentType.JSON;case"application/x-www-form-urlencoded":return ContentType.FORM;case"multipart/form-data":return ContentType.FORM_DATA;case"text/plain":case"text/html":return ContentType.TEXT;case"application/octet-stream":return ContentType.BLOB;default:return this.detectContentTypeFromBody()}},Request.prototype.detectContentTypeFromBody=function(){return null==this._body?ContentType.NONE:this._body instanceof URLSearchParams?ContentType.FORM:this._body instanceof FormData?ContentType.FORM_DATA:this._body instanceof Blob$1?ContentType.BLOB:this._body instanceof ArrayBuffer$1?ContentType.ARRAY_BUFFER:this._body&&"object"==typeof this._body?ContentType.JSON:ContentType.TEXT},Request.prototype.getBody=function(){switch(this.contentType){case ContentType.JSON:return this.text();case ContentType.FORM:return this.text();case ContentType.FORM_DATA:return this._body;case ContentType.TEXT:return this.text();case ContentType.BLOB:return this.blob();case ContentType.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},Request}(Body),noop=function(){},w="object"==typeof window?window:noop,FormData=w.FormData||noop,Blob$1=w.Blob||noop,ArrayBuffer$1=w.ArrayBuffer||noop,__extends$4=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},Http=function(){function Http(_backend,_defaultOptions){this._backend=_backend,this._defaultOptions=_defaultOptions}return Http.prototype.request=function(url,options){var responseObservable;if("string"==typeof url)responseObservable=httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Get,url)));else{if(!(url instanceof Request))throw new Error("First argument must be a url string or Request instance.");responseObservable=httpRequest(this._backend,url)}return responseObservable},Http.prototype.get=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Get,url)))},Http.prototype.post=function(url,body,options){return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,RequestMethod.Post,url)))},Http.prototype.put=function(url,body,options){return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,RequestMethod.Put,url)))},Http.prototype.delete=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Delete,url)))},Http.prototype.patch=function(url,body,options){return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,RequestMethod.Patch,url)))},Http.prototype.head=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Head,url)))},Http.prototype.options=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Options,url)))},Http.decorators=[{type:_angular_core.Injectable}],Http.ctorParameters=function(){return[{type:ConnectionBackend},{type:RequestOptions}]},Http}(),Jsonp=function(_super){function Jsonp(backend,defaultOptions){_super.call(this,backend,defaultOptions)}return __extends$4(Jsonp,_super),Jsonp.prototype.request=function(url,options){var responseObservable;if("string"==typeof url&&(url=new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Get,url))),!(url instanceof Request))throw new Error("First argument must be a url string or Request instance.");if(url.method!==RequestMethod.Get)throw new Error("JSONP requests must use GET request method.");return responseObservable=httpRequest(this._backend,url)},Jsonp.decorators=[{type:_angular_core.Injectable}],Jsonp.ctorParameters=function(){return[{type:ConnectionBackend},{type:RequestOptions}]},Jsonp}(Http),HttpModule=function(){function HttpModule(){}return HttpModule.decorators=[{type:_angular_core.NgModule,args:[{providers:[{provide:Http,useFactory:httpFactory,deps:[XHRBackend,RequestOptions]},BrowserXhr,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},XHRBackend,{provide:XSRFStrategy,useFactory:_createDefaultCookieXSRFStrategy}]}]}],HttpModule.ctorParameters=function(){return[]},HttpModule}(),JsonpModule=function(){function JsonpModule(){}return JsonpModule.decorators=[{type:_angular_core.NgModule,args:[{providers:[{provide:Jsonp,useFactory:jsonpFactory,deps:[JSONPBackend,RequestOptions]},BrowserJsonp,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},{provide:JSONPBackend,useClass:JSONPBackend_}]}]}],JsonpModule.ctorParameters=function(){return[]},JsonpModule}(),VERSION=new _angular_core.Version("4.0.0-beta.3");exports.BrowserXhr=BrowserXhr,exports.JSONPBackend=JSONPBackend,exports.JSONPConnection=JSONPConnection,exports.CookieXSRFStrategy=CookieXSRFStrategy,exports.XHRBackend=XHRBackend,exports.XHRConnection=XHRConnection,exports.BaseRequestOptions=BaseRequestOptions,exports.RequestOptions=RequestOptions,exports.BaseResponseOptions=BaseResponseOptions,exports.ResponseOptions=ResponseOptions,exports.ReadyState=ReadyState,exports.RequestMethod=RequestMethod,exports.ResponseContentType=ResponseContentType,exports.ResponseType=ResponseType,exports.Headers=Headers,exports.Http=Http,exports.Jsonp=Jsonp,exports.HttpModule=HttpModule,exports.JsonpModule=JsonpModule,exports.Connection=Connection,exports.ConnectionBackend=ConnectionBackend,exports.XSRFStrategy=XSRFStrategy,exports.Request=Request,exports.Response=Response,exports.QueryEncoder=QueryEncoder,exports.URLSearchParams=URLSearchParams,exports.VERSION=VERSION});
function paramParser(rawParams){void 0===rawParams&&(rawParams="");var map=new Map;if(rawParams.length>0){var params=rawParams.split("&");params.forEach(function(param){var eqIdx=param.indexOf("="),_a=eqIdx==-1?[param,""]:[param.slice(0,eqIdx),param.slice(eqIdx+1)],key=_a[0],val=_a[1],list=map.get(key)||[];list.push(val),map.set(key,list)})}return map}function standardEncoding(v){return encodeURIComponent(v).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}function _getJsonpConnections(){var w="object"==typeof window?window:{};return null===_jsonpConnections&&(_jsonpConnections=w[JSONP_HOME]={}),_jsonpConnections}function httpRequest(backend,request){return backend.createConnection(request).response}function mergeOptions(defaultOpts,providedOpts,method,url){var newOptions=defaultOpts;return providedOpts?newOptions.merge(new RequestOptions({method:providedOpts.method||method,url:providedOpts.url||url,search:providedOpts.search,headers:providedOpts.headers,body:providedOpts.body,withCredentials:providedOpts.withCredentials,responseType:providedOpts.responseType})):newOptions.merge(new RequestOptions({method:method,url:url}))}function _createDefaultCookieXSRFStrategy(){return new CookieXSRFStrategy}function httpFactory(xhrBackend,requestOptions){return new Http(xhrBackend,requestOptions)}function jsonpFactory(jsonpBackend,requestOptions){return new Jsonp(jsonpBackend,requestOptions)}var BrowserXhr=function(){function BrowserXhr(){}return BrowserXhr.prototype.build=function(){return new XMLHttpRequest},BrowserXhr.decorators=[{type:_angular_core.Injectable}],BrowserXhr.ctorParameters=function(){return[]},BrowserXhr}(),RequestMethod={};RequestMethod.Get=0,RequestMethod.Post=1,RequestMethod.Put=2,RequestMethod.Delete=3,RequestMethod.Options=4,RequestMethod.Head=5,RequestMethod.Patch=6,RequestMethod[RequestMethod.Get]="Get",RequestMethod[RequestMethod.Post]="Post",RequestMethod[RequestMethod.Put]="Put",RequestMethod[RequestMethod.Delete]="Delete",RequestMethod[RequestMethod.Options]="Options",RequestMethod[RequestMethod.Head]="Head",RequestMethod[RequestMethod.Patch]="Patch";var ReadyState={};ReadyState.Unsent=0,ReadyState.Open=1,ReadyState.HeadersReceived=2,ReadyState.Loading=3,ReadyState.Done=4,ReadyState.Cancelled=5,ReadyState[ReadyState.Unsent]="Unsent",ReadyState[ReadyState.Open]="Open",ReadyState[ReadyState.HeadersReceived]="HeadersReceived",ReadyState[ReadyState.Loading]="Loading",ReadyState[ReadyState.Done]="Done",ReadyState[ReadyState.Cancelled]="Cancelled";var ResponseType={};ResponseType.Basic=0,ResponseType.Cors=1,ResponseType.Default=2,ResponseType.Error=3,ResponseType.Opaque=4,ResponseType[ResponseType.Basic]="Basic",ResponseType[ResponseType.Cors]="Cors",ResponseType[ResponseType.Default]="Default",ResponseType[ResponseType.Error]="Error",ResponseType[ResponseType.Opaque]="Opaque";var ContentType={};ContentType.NONE=0,ContentType.JSON=1,ContentType.FORM=2,ContentType.FORM_DATA=3,ContentType.TEXT=4,ContentType.BLOB=5,ContentType.ARRAY_BUFFER=6,ContentType[ContentType.NONE]="NONE",ContentType[ContentType.JSON]="JSON",ContentType[ContentType.FORM]="FORM",ContentType[ContentType.FORM_DATA]="FORM_DATA",ContentType[ContentType.TEXT]="TEXT",ContentType[ContentType.BLOB]="BLOB",ContentType[ContentType.ARRAY_BUFFER]="ARRAY_BUFFER";var ResponseContentType={};ResponseContentType.Text=0,ResponseContentType.Json=1,ResponseContentType.ArrayBuffer=2,ResponseContentType.Blob=3,ResponseContentType[ResponseContentType.Text]="Text",ResponseContentType[ResponseContentType.Json]="Json",ResponseContentType[ResponseContentType.ArrayBuffer]="ArrayBuffer",ResponseContentType[ResponseContentType.Blob]="Blob";var Headers=function(){function Headers(headers){var _this=this;if(this._headers=new Map,this._normalizedNames=new Map,headers)return headers instanceof Headers?void headers.forEach(function(values,name){values.forEach(function(value){return _this.append(name,value)})}):void Object.keys(headers).forEach(function(name){var values=Array.isArray(headers[name])?headers[name]:[headers[name]];_this.delete(name),values.forEach(function(value){return _this.append(name,value)})})}return Headers.fromResponseHeaderString=function(headersString){var headers=new Headers;return headersString.split("\n").forEach(function(line){var index=line.indexOf(":");if(index>0){var name_1=line.slice(0,index),value=line.slice(index+1).trim();headers.set(name_1,value)}}),headers},Headers.prototype.append=function(name,value){var values=this.getAll(name);null===values?this.set(name,value):values.push(value)},Headers.prototype.delete=function(name){var lcName=name.toLowerCase();this._normalizedNames.delete(lcName),this._headers.delete(lcName)},Headers.prototype.forEach=function(fn){var _this=this;this._headers.forEach(function(values,lcName){return fn(values,_this._normalizedNames.get(lcName),_this._headers)})},Headers.prototype.get=function(name){var values=this.getAll(name);return null===values?null:values.length>0?values[0]:null},Headers.prototype.has=function(name){return this._headers.has(name.toLowerCase())},Headers.prototype.keys=function(){return Array.from(this._normalizedNames.values())},Headers.prototype.set=function(name,value){Array.isArray(value)?value.length&&this._headers.set(name.toLowerCase(),[value.join(",")]):this._headers.set(name.toLowerCase(),[value]),this.mayBeSetNormalizedName(name)},Headers.prototype.values=function(){return Array.from(this._headers.values())},Headers.prototype.toJSON=function(){var _this=this,serialized={};return this._headers.forEach(function(values,name){var split=[];values.forEach(function(v){return split.push.apply(split,v.split(","))}),serialized[_this._normalizedNames.get(name)]=split}),serialized},Headers.prototype.getAll=function(name){return this.has(name)?this._headers.get(name.toLowerCase()):null},Headers.prototype.entries=function(){throw new Error('"entries" method is not implemented on Headers class')},Headers.prototype.mayBeSetNormalizedName=function(name){var lcName=name.toLowerCase();this._normalizedNames.has(lcName)||this._normalizedNames.set(lcName,name)},Headers}(),__extends$1=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},ResponseOptions=function(){function ResponseOptions(_a){var _b=void 0===_a?{}:_a,body=_b.body,status=_b.status,headers=_b.headers,statusText=_b.statusText,type=_b.type,url=_b.url;this.body=null!=body?body:null,this.status=null!=status?status:null,this.headers=null!=headers?headers:null,this.statusText=null!=statusText?statusText:null,this.type=null!=type?type:null,this.url=null!=url?url:null}return ResponseOptions.prototype.merge=function(options){return new ResponseOptions({body:options&&null!=options.body?options.body:this.body,status:options&&null!=options.status?options.status:this.status,headers:options&&null!=options.headers?options.headers:this.headers,statusText:options&&null!=options.statusText?options.statusText:this.statusText,type:options&&null!=options.type?options.type:this.type,url:options&&null!=options.url?options.url:this.url})},ResponseOptions}(),BaseResponseOptions=function(_super){function BaseResponseOptions(){_super.call(this,{status:200,statusText:"Ok",type:ResponseType.Default,headers:new Headers})}return __extends$1(BaseResponseOptions,_super),BaseResponseOptions.decorators=[{type:_angular_core.Injectable}],BaseResponseOptions.ctorParameters=function(){return[]},BaseResponseOptions}(ResponseOptions),ConnectionBackend=function(){function ConnectionBackend(){}return ConnectionBackend.prototype.createConnection=function(request){},ConnectionBackend}(),Connection=function(){function Connection(){}return Connection}(),XSRFStrategy=function(){function XSRFStrategy(){}return XSRFStrategy.prototype.configureRequest=function(req){},XSRFStrategy}(),isSuccess=function(status){return status>=200&&status<300},QueryEncoder=function(){function QueryEncoder(){}return QueryEncoder.prototype.encodeKey=function(k){return standardEncoding(k)},QueryEncoder.prototype.encodeValue=function(v){return standardEncoding(v)},QueryEncoder}(),URLSearchParams=function(){function URLSearchParams(rawParams,queryEncoder){void 0===rawParams&&(rawParams=""),void 0===queryEncoder&&(queryEncoder=new QueryEncoder),this.rawParams=rawParams,this.queryEncoder=queryEncoder,this.paramsMap=paramParser(rawParams)}return URLSearchParams.prototype.clone=function(){var clone=new URLSearchParams("",this.queryEncoder);return clone.appendAll(this),clone},URLSearchParams.prototype.has=function(param){return this.paramsMap.has(param)},URLSearchParams.prototype.get=function(param){var storedParam=this.paramsMap.get(param);return Array.isArray(storedParam)?storedParam[0]:null},URLSearchParams.prototype.getAll=function(param){return this.paramsMap.get(param)||[]},URLSearchParams.prototype.set=function(param,val){if(void 0===val||null===val)return void this.delete(param);var list=this.paramsMap.get(param)||[];list.length=0,list.push(val),this.paramsMap.set(param,list)},URLSearchParams.prototype.setAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var list=_this.paramsMap.get(param)||[];list.length=0,list.push(value[0]),_this.paramsMap.set(param,list)})},URLSearchParams.prototype.append=function(param,val){if(void 0!==val&&null!==val){var list=this.paramsMap.get(param)||[];list.push(val),this.paramsMap.set(param,list)}},URLSearchParams.prototype.appendAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){for(var list=_this.paramsMap.get(param)||[],i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.replaceAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var list=_this.paramsMap.get(param)||[];list.length=0;for(var i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.toString=function(){var _this=this,paramsList=[];return this.paramsMap.forEach(function(values,k){values.forEach(function(v){return paramsList.push(_this.queryEncoder.encodeKey(k)+"="+_this.queryEncoder.encodeValue(v))})}),paramsList.join("&")},URLSearchParams.prototype.delete=function(param){this.paramsMap.delete(param)},URLSearchParams}(),Body=function(){function Body(){}return Body.prototype.json=function(){return"string"==typeof this._body?JSON.parse(this._body):this._body instanceof ArrayBuffer?JSON.parse(this.text()):this._body},Body.prototype.text=function(){return this._body instanceof URLSearchParams?this._body.toString():this._body instanceof ArrayBuffer?String.fromCharCode.apply(null,new Uint16Array(this._body)):null==this._body?"":"object"==typeof this._body?JSON.stringify(this._body,null,2):this._body.toString()},Body.prototype.arrayBuffer=function(){return this._body instanceof ArrayBuffer?this._body:stringToArrayBuffer(this.text())},Body.prototype.blob=function(){if(this._body instanceof Blob)return this._body;if(this._body instanceof ArrayBuffer)return new Blob([this._body]);throw new Error("The request body isn't either a blob or an array buffer")},Body}(),__extends$2=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},Response=function(_super){function Response(responseOptions){_super.call(this),this._body=responseOptions.body,this.status=responseOptions.status,this.ok=this.status>=200&&this.status<=299,this.statusText=responseOptions.statusText,this.headers=responseOptions.headers,this.type=responseOptions.type,this.url=responseOptions.url}return __extends$2(Response,_super),Response.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},Response}(Body),_nextRequestId=0,JSONP_HOME="__ng_jsonp__",_jsonpConnections=null,BrowserJsonp=function(){function BrowserJsonp(){}return BrowserJsonp.prototype.build=function(url){var node=document.createElement("script");return node.src=url,node},BrowserJsonp.prototype.nextRequestID=function(){return"__req"+_nextRequestId++},BrowserJsonp.prototype.requestCallback=function(id){return JSONP_HOME+"."+id+".finished"},BrowserJsonp.prototype.exposeConnection=function(id,connection){var connections=_getJsonpConnections();connections[id]=connection},BrowserJsonp.prototype.removeConnection=function(id){var connections=_getJsonpConnections();connections[id]=null},BrowserJsonp.prototype.send=function(node){document.body.appendChild(node)},BrowserJsonp.prototype.cleanup=function(node){node.parentNode&&node.parentNode.removeChild(node)},BrowserJsonp.decorators=[{type:_angular_core.Injectable}],BrowserJsonp.ctorParameters=function(){return[]},BrowserJsonp}(),__extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},JSONP_ERR_NO_CALLBACK="JSONP injected script did not invoke callback.",JSONP_ERR_WRONG_METHOD="JSONP requests must use GET request method.",JSONPConnection=function(){function JSONPConnection(){}return JSONPConnection.prototype.finished=function(data){},JSONPConnection}(),JSONPConnection_=function(_super){function JSONPConnection_(req,_dom,baseResponseOptions){var _this=this;if(_super.call(this),this._dom=_dom,this.baseResponseOptions=baseResponseOptions,this._finished=!1,req.method!==RequestMethod.Get)throw new TypeError(JSONP_ERR_WRONG_METHOD);this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){_this.readyState=ReadyState.Loading;var id=_this._id=_dom.nextRequestID();_dom.exposeConnection(id,_this);var callback=_dom.requestCallback(_this._id),url=req.url;url.indexOf("=JSONP_CALLBACK&")>-1?url=url.replace("=JSONP_CALLBACK&","="+callback+"&"):url.lastIndexOf("=JSONP_CALLBACK")===url.length-"=JSONP_CALLBACK".length&&(url=url.substring(0,url.length-"=JSONP_CALLBACK".length)+("="+callback));var script=_this._script=_dom.build(url),onLoad=function(event){if(_this.readyState!==ReadyState.Cancelled){if(_this.readyState=ReadyState.Done,_dom.cleanup(script),!_this._finished){var responseOptions_1=new ResponseOptions({body:JSONP_ERR_NO_CALLBACK,type:ResponseType.Error,url:url});return baseResponseOptions&&(responseOptions_1=baseResponseOptions.merge(responseOptions_1)),void responseObserver.error(new Response(responseOptions_1))}var responseOptions=new ResponseOptions({body:_this._responseData,url:url});_this.baseResponseOptions&&(responseOptions=_this.baseResponseOptions.merge(responseOptions)),responseObserver.next(new Response(responseOptions)),responseObserver.complete()}},onError=function(error){if(_this.readyState!==ReadyState.Cancelled){_this.readyState=ReadyState.Done,_dom.cleanup(script);var responseOptions=new ResponseOptions({body:error.message,type:ResponseType.Error});baseResponseOptions&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))}};return script.addEventListener("load",onLoad),script.addEventListener("error",onError),_dom.send(script),function(){_this.readyState=ReadyState.Cancelled,script.removeEventListener("load",onLoad),script.removeEventListener("error",onError),_this._dom.cleanup(script)}})}return __extends(JSONPConnection_,_super),JSONPConnection_.prototype.finished=function(data){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==ReadyState.Cancelled&&(this._responseData=data)},JSONPConnection_}(JSONPConnection),JSONPBackend=function(_super){function JSONPBackend(){_super.apply(this,arguments)}return __extends(JSONPBackend,_super),JSONPBackend}(ConnectionBackend),JSONPBackend_=function(_super){function JSONPBackend_(_browserJSONP,_baseResponseOptions){_super.call(this),this._browserJSONP=_browserJSONP,this._baseResponseOptions=_baseResponseOptions}return __extends(JSONPBackend_,_super),JSONPBackend_.prototype.createConnection=function(request){return new JSONPConnection_(request,this._browserJSONP,this._baseResponseOptions)},JSONPBackend_.decorators=[{type:_angular_core.Injectable}],JSONPBackend_.ctorParameters=function(){return[{type:BrowserJsonp},{type:ResponseOptions}]},JSONPBackend_}(JSONPBackend),XSSI_PREFIX=/^\)\]\}',?\n/,XHRConnection=function(){function XHRConnection(req,browserXHR,baseResponseOptions){var _this=this;this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){var _xhr=browserXHR.build();_xhr.open(RequestMethod[req.method].toUpperCase(),req.url),null!=req.withCredentials&&(_xhr.withCredentials=req.withCredentials);var onLoad=function(){var status=1223===_xhr.status?204:_xhr.status,body=null;204!==status&&(body="undefined"==typeof _xhr.response?_xhr.responseText:_xhr.response,"string"==typeof body&&(body=body.replace(XSSI_PREFIX,""))),0===status&&(status=body?200:0);var headers=Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders()),url=getResponseURL(_xhr)||req.url,statusText=_xhr.statusText||"OK",responseOptions=new ResponseOptions({body:body,status:status,headers:headers,statusText:statusText,url:url});null!=baseResponseOptions&&(responseOptions=baseResponseOptions.merge(responseOptions));var response=new Response(responseOptions);return response.ok=isSuccess(status),response.ok?(responseObserver.next(response),void responseObserver.complete()):void responseObserver.error(response)},onError=function(err){var responseOptions=new ResponseOptions({body:err,type:ResponseType.Error,status:_xhr.status,statusText:_xhr.statusText});null!=baseResponseOptions&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))};if(_this.setDetectedContentType(req,_xhr),null==req.headers&&(req.headers=new Headers),req.headers.has("Accept")||req.headers.append("Accept","application/json, text/plain, */*"),req.headers.forEach(function(values,name){return _xhr.setRequestHeader(name,values.join(","))}),null!=req.responseType&&null!=_xhr.responseType)switch(req.responseType){case ResponseContentType.ArrayBuffer:_xhr.responseType="arraybuffer";break;case ResponseContentType.Json:_xhr.responseType="json";break;case ResponseContentType.Text:_xhr.responseType="text";break;case ResponseContentType.Blob:_xhr.responseType="blob";break;default:throw new Error("The selected responseType is not supported")}return _xhr.addEventListener("load",onLoad),_xhr.addEventListener("error",onError),_xhr.send(_this.request.getBody()),function(){_xhr.removeEventListener("load",onLoad),_xhr.removeEventListener("error",onError),_xhr.abort()}})}return XHRConnection.prototype.setDetectedContentType=function(req,_xhr){if(null==req.headers||null==req.headers.get("Content-Type"))switch(req.contentType){case ContentType.NONE:break;case ContentType.JSON:_xhr.setRequestHeader("content-type","application/json");break;case ContentType.FORM:_xhr.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");break;case ContentType.TEXT:_xhr.setRequestHeader("content-type","text/plain");break;case ContentType.BLOB:var blob=req.blob();blob.type&&_xhr.setRequestHeader("content-type",blob.type)}},XHRConnection}(),CookieXSRFStrategy=function(){function CookieXSRFStrategy(_cookieName,_headerName){void 0===_cookieName&&(_cookieName="XSRF-TOKEN"),void 0===_headerName&&(_headerName="X-XSRF-TOKEN"),this._cookieName=_cookieName,this._headerName=_headerName}return CookieXSRFStrategy.prototype.configureRequest=function(req){var xsrfToken=_angular_platformBrowser.__platform_browser_private__.getDOM().getCookie(this._cookieName);xsrfToken&&req.headers.set(this._headerName,xsrfToken)},CookieXSRFStrategy}(),XHRBackend=function(){function XHRBackend(_browserXHR,_baseResponseOptions,_xsrfStrategy){this._browserXHR=_browserXHR,this._baseResponseOptions=_baseResponseOptions,this._xsrfStrategy=_xsrfStrategy}return XHRBackend.prototype.createConnection=function(request){return this._xsrfStrategy.configureRequest(request),new XHRConnection(request,this._browserXHR,this._baseResponseOptions)},XHRBackend.decorators=[{type:_angular_core.Injectable}],XHRBackend.ctorParameters=function(){return[{type:BrowserXhr},{type:ResponseOptions},{type:XSRFStrategy}]},XHRBackend}(),__extends$3=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},RequestOptions=function(){function RequestOptions(_a){var _b=void 0===_a?{}:_a,method=_b.method,headers=_b.headers,body=_b.body,url=_b.url,search=_b.search,params=_b.params,withCredentials=_b.withCredentials,responseType=_b.responseType;this.method=null!=method?normalizeMethodName(method):null,this.headers=null!=headers?headers:null,this.body=null!=body?body:null,this.url=null!=url?url:null,this.params=this._mergeSearchParams(params||search),this.withCredentials=null!=withCredentials?withCredentials:null,this.responseType=null!=responseType?responseType:null}return Object.defineProperty(RequestOptions.prototype,"search",{get:function(){return this.params},set:function(params){this.params=params},enumerable:!0,configurable:!0}),RequestOptions.prototype.merge=function(options){return new RequestOptions({method:options&&null!=options.method?options.method:this.method,headers:options&&null!=options.headers?options.headers:new Headers(this.headers),body:options&&null!=options.body?options.body:this.body,url:options&&null!=options.url?options.url:this.url,params:options&&this._mergeSearchParams(options.params||options.search),withCredentials:options&&null!=options.withCredentials?options.withCredentials:this.withCredentials,responseType:options&&null!=options.responseType?options.responseType:this.responseType})},RequestOptions.prototype._mergeSearchParams=function(params){return params?params instanceof URLSearchParams?params.clone():"string"==typeof params?new URLSearchParams(params):this._parseParams(params):this.params},RequestOptions.prototype._parseParams=function(objParams){var _this=this;void 0===objParams&&(objParams={});var params=new URLSearchParams;return Object.keys(objParams).forEach(function(key){var value=objParams[key];Array.isArray(value)?value.forEach(function(item){return _this._appendParam(key,item,params)}):_this._appendParam(key,value,params)}),params},RequestOptions.prototype._appendParam=function(key,value,params){"string"!=typeof value&&(value=JSON.stringify(value)),params.append(key,value)},RequestOptions}(),BaseRequestOptions=function(_super){function BaseRequestOptions(){_super.call(this,{method:RequestMethod.Get,headers:new Headers})}return __extends$3(BaseRequestOptions,_super),BaseRequestOptions.decorators=[{type:_angular_core.Injectable}],BaseRequestOptions.ctorParameters=function(){return[]},BaseRequestOptions}(RequestOptions),__extends$5=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},Request=function(_super){function Request(requestOptions){_super.call(this);var url=requestOptions.url;if(this.url=requestOptions.url,requestOptions.params){var params=requestOptions.params.toString();if(params.length>0){var prefix="?";this.url.indexOf("?")!=-1&&(prefix="&"==this.url[this.url.length-1]?"":"&"),this.url=url+prefix+params}}this._body=requestOptions.body,this.method=normalizeMethodName(requestOptions.method),this.headers=new Headers(requestOptions.headers),this.contentType=this.detectContentType(),this.withCredentials=requestOptions.withCredentials,this.responseType=requestOptions.responseType}return __extends$5(Request,_super),Request.prototype.detectContentType=function(){switch(this.headers.get("content-type")){case"application/json":return ContentType.JSON;case"application/x-www-form-urlencoded":return ContentType.FORM;case"multipart/form-data":return ContentType.FORM_DATA;case"text/plain":case"text/html":return ContentType.TEXT;case"application/octet-stream":return this._body instanceof ArrayBuffer$1?ContentType.ARRAY_BUFFER:ContentType.BLOB;default:return this.detectContentTypeFromBody()}},Request.prototype.detectContentTypeFromBody=function(){return null==this._body?ContentType.NONE:this._body instanceof URLSearchParams?ContentType.FORM:this._body instanceof FormData?ContentType.FORM_DATA:this._body instanceof Blob$1?ContentType.BLOB:this._body instanceof ArrayBuffer$1?ContentType.ARRAY_BUFFER:this._body&&"object"==typeof this._body?ContentType.JSON:ContentType.TEXT},Request.prototype.getBody=function(){switch(this.contentType){case ContentType.JSON:return this.text();case ContentType.FORM:return this.text();case ContentType.FORM_DATA:return this._body;case ContentType.TEXT:return this.text();case ContentType.BLOB:return this.blob();case ContentType.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},Request}(Body),noop=function(){},w="object"==typeof window?window:noop,FormData=w.FormData||noop,Blob$1=w.Blob||noop,ArrayBuffer$1=w.ArrayBuffer||noop,__extends$4=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},Http=function(){function Http(_backend,_defaultOptions){this._backend=_backend,this._defaultOptions=_defaultOptions}return Http.prototype.request=function(url,options){var responseObservable;if("string"==typeof url)responseObservable=httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Get,url)));else{if(!(url instanceof Request))throw new Error("First argument must be a url string or Request instance.");responseObservable=httpRequest(this._backend,url)}return responseObservable},Http.prototype.get=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Get,url)))},Http.prototype.post=function(url,body,options){return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,RequestMethod.Post,url)))},Http.prototype.put=function(url,body,options){return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,RequestMethod.Put,url)))},Http.prototype.delete=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Delete,url)))},Http.prototype.patch=function(url,body,options){return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,RequestMethod.Patch,url)))},Http.prototype.head=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Head,url)))},Http.prototype.options=function(url,options){return this.request(new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Options,url)))},Http.decorators=[{type:_angular_core.Injectable}],Http.ctorParameters=function(){return[{type:ConnectionBackend},{type:RequestOptions}]},Http}(),Jsonp=function(_super){function Jsonp(backend,defaultOptions){_super.call(this,backend,defaultOptions)}return __extends$4(Jsonp,_super),Jsonp.prototype.request=function(url,options){var responseObservable;if("string"==typeof url&&(url=new Request(mergeOptions(this._defaultOptions,options,RequestMethod.Get,url))),!(url instanceof Request))throw new Error("First argument must be a url string or Request instance.");if(url.method!==RequestMethod.Get)throw new Error("JSONP requests must use GET request method.");return responseObservable=httpRequest(this._backend,url)},Jsonp.decorators=[{type:_angular_core.Injectable}],Jsonp.ctorParameters=function(){return[{type:ConnectionBackend},{type:RequestOptions}]},Jsonp}(Http),HttpModule=function(){function HttpModule(){}return HttpModule.decorators=[{type:_angular_core.NgModule,args:[{providers:[{provide:Http,useFactory:httpFactory,deps:[XHRBackend,RequestOptions]},BrowserXhr,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},XHRBackend,{provide:XSRFStrategy,useFactory:_createDefaultCookieXSRFStrategy}]}]}],HttpModule.ctorParameters=function(){return[]},HttpModule}(),JsonpModule=function(){function JsonpModule(){}return JsonpModule.decorators=[{type:_angular_core.NgModule,args:[{providers:[{provide:Jsonp,useFactory:jsonpFactory,deps:[JSONPBackend,RequestOptions]},BrowserJsonp,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},{provide:JSONPBackend,useClass:JSONPBackend_}]}]}],JsonpModule.ctorParameters=function(){return[]},JsonpModule}(),VERSION=new _angular_core.Version("4.0.0-beta.4");exports.BrowserXhr=BrowserXhr,exports.JSONPBackend=JSONPBackend,exports.JSONPConnection=JSONPConnection,exports.CookieXSRFStrategy=CookieXSRFStrategy,exports.XHRBackend=XHRBackend,exports.XHRConnection=XHRConnection,exports.BaseRequestOptions=BaseRequestOptions,exports.RequestOptions=RequestOptions,exports.BaseResponseOptions=BaseResponseOptions,exports.ResponseOptions=ResponseOptions,exports.ReadyState=ReadyState,exports.RequestMethod=RequestMethod,exports.ResponseContentType=ResponseContentType,exports.ResponseType=ResponseType,exports.Headers=Headers,exports.Http=Http,exports.Jsonp=Jsonp,exports.HttpModule=HttpModule,exports.JsonpModule=JsonpModule,exports.Connection=Connection,exports.ConnectionBackend=ConnectionBackend,exports.XSRFStrategy=XSRFStrategy,exports.Request=Request,exports.Response=Response,exports.QueryEncoder=QueryEncoder,exports.URLSearchParams=URLSearchParams,exports.VERSION=VERSION});
{
"name": "@angular/http",
"version": "4.0.0-beta.3",
"version": "4.0.0-beta.4",
"description": "Angular - the http service",

@@ -12,4 +12,4 @@ "main": "bundles/http.umd.js",

"rxjs": "^5.0.1",
"@angular/core": "4.0.0-beta.3",
"@angular/platform-browser": "4.0.0-beta.3"
"@angular/core": "4.0.0-beta.4",
"@angular/platform-browser": "4.0.0-beta.4"
},

@@ -16,0 +16,0 @@ "repository": {

@@ -22,3 +22,2 @@ /**

}
// Make sure not to evaluate this in a non-browser environment!
export var BrowserJsonp = (function () {

@@ -25,0 +24,0 @@ function BrowserJsonp() {

@@ -10,6 +10,7 @@ /**

/**
* A backend for http that uses the `XMLHttpRequest` browser API.
* *
* Take care not to evaluate this in non-browser contexts.
* *
* A backend for http that uses the `XMLHttpRequest` browser API.
*
* Take care not to evaluate this in non-browser contexts.
*
* \@experimental
*/

@@ -16,0 +17,0 @@ export var BrowserXhr = (function () {

@@ -23,4 +23,5 @@ /**

/**
* Abstract base class for an in-flight JSONP request.
* *
* Abstract base class for an in-flight JSONP request.
*
* \@experimental
* @abstract

@@ -32,4 +33,4 @@ */

/**
* Callback called when the JSONP request completes, to notify the application
* of the new data.
* Callback called when the JSONP request completes, to notify the application
* of the new data.
* @abstract

@@ -44,3 +45,3 @@ * @param {?=} data

/**
* The {@link ReadyState} of this request.
* The {\@link ReadyState} of this request.
* @type {?}

@@ -163,4 +164,5 @@ */

/**
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests.
* *
* A {\@link ConnectionBackend} that uses the JSONP strategy of making requests.
*
* \@experimental
* @abstract

@@ -167,0 +169,0 @@ */

@@ -20,9 +20,10 @@ /**

/**
* Creates connections using `XMLHttpRequest`. Given a fully-qualified
* request, an `XHRConnection` will immediately create an `XMLHttpRequest` object and send the
* request.
* *
* This class would typically not be created or interacted with directly inside applications, though
* the {@link MockConnection} may be interacted with in tests.
* *
* Creates connections using `XMLHttpRequest`. Given a fully-qualified
* request, an `XHRConnection` will immediately create an `XMLHttpRequest` object and send the
* request.
*
* This class would typically not be created or interacted with directly inside applications, though
* the {\@link MockConnection} may be interacted with in tests.
*
* \@experimental
*/

@@ -171,3 +172,3 @@ export var XHRConnection = (function () {

/**
* Response {@link EventEmitter} which emits a single {@link Response} value on load event of
* Response {\@link EventEmitter} which emits a single {\@link Response} value on load event of
* `XMLHttpRequest`.

@@ -181,10 +182,11 @@ * @type {?}

/**
* `XSRFConfiguration` sets up Cross Site Request Forgery (XSRF) protection for the application
* using a cookie. See {@link https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)}
* for more information on XSRF.
* *
* Applications can configure custom cookie and header names by binding an instance of this class
* with different `cookieName` and `headerName` values. See the main HTTP documentation for more
* details.
* *
* `XSRFConfiguration` sets up Cross Site Request Forgery (XSRF) protection for the application
* using a cookie. See {\@link https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)}
* for more information on XSRF.
*
* Applications can configure custom cookie and header names by binding an instance of this class
* with different `cookieName` and `headerName` values. See the main HTTP documentation for more
* details.
*
* \@experimental
*/

@@ -221,24 +223,26 @@ export var CookieXSRFStrategy = (function () {

/**
* Creates {@link XHRConnection} instances.
* *
* This class would typically not be used by end users, but could be
* overridden if a different backend implementation should be used,
* such as in a node backend.
* *
* ### Example
* *
* ```
* import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequestOptions} from '@angular/http';
* viewProviders: [
* HTTP_PROVIDERS,
* {provide: Http, useFactory: (backend, options) => {
* return new Http(backend, options);
* }, deps: [MyNodeBackend, BaseRequestOptions]}]
* })
* class MyComponent {
* constructor(http:Http) {
* http.request('people.json').subscribe(res => this.people = res.json());
* }
* }
* ```
* Creates {\@link XHRConnection} instances.
*
* This class would typically not be used by end users, but could be
* overridden if a different backend implementation should be used,
* such as in a node backend.
*
* ### Example
*
* ```
* import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequestOptions} from '\@angular/http';
* \@Component({
* viewProviders: [
* HTTP_PROVIDERS,
* {provide: Http, useFactory: (backend, options) => {
* return new Http(backend, options);
* }, deps: [MyNodeBackend, BaseRequestOptions]}]
* })
* class MyComponent {
* constructor(http:Http) {
* http.request('people.json').subscribe(res => this.people = res.json());
* }
* }
* ```
* \@experimental
*/

@@ -245,0 +249,0 @@ export var XHRBackend = (function () {

@@ -19,25 +19,26 @@ /**

/**
* Creates a request options object to be optionally provided when instantiating a
* {@link Request}.
* *
* This class is based on the `RequestInit` description in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#requestinit).
* *
* All values are null by default. Typical defaults can be found in the {@link BaseRequestOptions}
* class, which sub-classes `RequestOptions`.
* *
* ### Example ([live demo](http://plnkr.co/edit/7Wvi3lfLq41aQPKlxB4O?p=preview))
* *
* ```typescript
* import {RequestOptions, Request, RequestMethod} from '@angular/http';
* *
* var options = new RequestOptions({
* method: RequestMethod.Post,
* url: 'https://google.com'
* });
* var req = new Request(options);
* console.log('req.method:', RequestMethod[req.method]); // Post
* console.log('options.url:', options.url); // https://google.com
* ```
* *
* Creates a request options object to be optionally provided when instantiating a
* {\@link Request}.
*
* This class is based on the `RequestInit` description in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#requestinit).
*
* All values are null by default. Typical defaults can be found in the {\@link BaseRequestOptions}
* class, which sub-classes `RequestOptions`.
*
* ### Example ([live demo](http://plnkr.co/edit/7Wvi3lfLq41aQPKlxB4O?p=preview))
*
* ```typescript
* import {RequestOptions, Request, RequestMethod} from '\@angular/http';
*
* var options = new RequestOptions({
* method: RequestMethod.Post,
* url: 'https://google.com'
* });
* var req = new Request(options);
* console.log('req.method:', RequestMethod[req.method]); // Post
* console.log('options.url:', options.url); // https://google.com
* ```
*
* \@experimental
*/

@@ -74,25 +75,25 @@ export var RequestOptions = (function () {

/**
* Creates a copy of the `RequestOptions` instance, using the optional input as values to override
* existing values. This method will not change the values of the instance on which it is being
* called.
* *
* Note that `headers` and `search` will override existing values completely if present in
* the `options` object. If these values should be merged, it should be done prior to calling
* `merge` on the `RequestOptions` instance.
* *
* ### Example ([live demo](http://plnkr.co/edit/6w8XA8YTkDRcPYpdB9dk?p=preview))
* *
* ```typescript
* import {RequestOptions, Request, RequestMethod} from '@angular/http';
* *
* var options = new RequestOptions({
* method: RequestMethod.Post
* });
* var req = new Request(options.merge({
* url: 'https://google.com'
* }));
* console.log('req.method:', RequestMethod[req.method]); // Post
* console.log('options.url:', options.url); // null
* console.log('req.url:', req.url); // https://google.com
* ```
* Creates a copy of the `RequestOptions` instance, using the optional input as values to override
* existing values. This method will not change the values of the instance on which it is being
* called.
*
* Note that `headers` and `search` will override existing values completely if present in
* the `options` object. If these values should be merged, it should be done prior to calling
* `merge` on the `RequestOptions` instance.
*
* ### Example ([live demo](http://plnkr.co/edit/6w8XA8YTkDRcPYpdB9dk?p=preview))
*
* ```typescript
* import {RequestOptions, Request, RequestMethod} from '\@angular/http';
*
* var options = new RequestOptions({
* method: RequestMethod.Post
* });
* var req = new Request(options.merge({
* url: 'https://google.com'
* }));
* console.log('req.method:', RequestMethod[req.method]); // Post
* console.log('options.url:', options.url); // null
* console.log('req.url:', req.url); // https://google.com
* ```
* @param {?=} options

@@ -164,4 +165,4 @@ * @return {?}

/**
* Http method with which to execute a {@link Request}.
* Acceptable methods are defined in the {@link RequestMethod} enum.
* Http method with which to execute a {\@link Request}.
* Acceptable methods are defined in the {\@link RequestMethod} enum.
* @type {?}

@@ -171,3 +172,3 @@ */

/**
* {@link Headers} to be attached to a {@link Request}.
* {\@link Headers} to be attached to a {\@link Request}.
* @type {?}

@@ -177,3 +178,3 @@ */

/**
* Body to be used when creating a {@link Request}.
* Body to be used when creating a {\@link Request}.
* @type {?}

@@ -183,3 +184,3 @@ */

/**
* Url with which to perform a {@link Request}.
* Url with which to perform a {\@link Request}.
* @type {?}

@@ -189,3 +190,3 @@ */

/**
* Search parameters to be included in a {@link Request}.
* Search parameters to be included in a {\@link Request}.
* @type {?}

@@ -195,3 +196,3 @@ */

/**
* Enable use credentials for a {@link Request}.
* Enable use credentials for a {\@link Request}.
* @type {?}

@@ -204,45 +205,46 @@ */

/**
* Subclass of {@link RequestOptions}, with default values.
* *
* Default values:
* * method: {@link RequestMethod RequestMethod.Get}
* * headers: empty {@link Headers} object
* *
* This class could be extended and bound to the {@link RequestOptions} class
* when configuring an {@link Injector}, in order to override the default options
* used by {@link Http} to create and send {@link Request Requests}.
* *
* ### Example ([live demo](http://plnkr.co/edit/LEKVSx?p=preview))
* *
* ```typescript
* import {provide} from '@angular/core';
* import {bootstrap} from '@angular/platform-browser/browser';
* import {HTTP_PROVIDERS, Http, BaseRequestOptions, RequestOptions} from '@angular/http';
* import {App} from './myapp';
* *
* class MyOptions extends BaseRequestOptions {
* search: string = 'coreTeam=true';
* }
* *
* bootstrap(App, [HTTP_PROVIDERS, {provide: RequestOptions, useClass: MyOptions}]);
* ```
* *
* The options could also be extended when manually creating a {@link Request}
* object.
* *
* ### Example ([live demo](http://plnkr.co/edit/oyBoEvNtDhOSfi9YxaVb?p=preview))
* *
* ```
* import {BaseRequestOptions, Request, RequestMethod} from '@angular/http';
* *
* var options = new BaseRequestOptions();
* var req = new Request(options.merge({
* method: RequestMethod.Post,
* url: 'https://google.com'
* }));
* console.log('req.method:', RequestMethod[req.method]); // Post
* console.log('options.url:', options.url); // null
* console.log('req.url:', req.url); // https://google.com
* ```
* *
* Subclass of {\@link RequestOptions}, with default values.
*
* Default values:
* * method: {\@link RequestMethod RequestMethod.Get}
* * headers: empty {\@link Headers} object
*
* This class could be extended and bound to the {\@link RequestOptions} class
* when configuring an {\@link Injector}, in order to override the default options
* used by {\@link Http} to create and send {\@link Request Requests}.
*
* ### Example ([live demo](http://plnkr.co/edit/LEKVSx?p=preview))
*
* ```typescript
* import {provide} from '\@angular/core';
* import {bootstrap} from '\@angular/platform-browser/browser';
* import {HTTP_PROVIDERS, Http, BaseRequestOptions, RequestOptions} from '\@angular/http';
* import {App} from './myapp';
*
* class MyOptions extends BaseRequestOptions {
* search: string = 'coreTeam=true';
* }
*
* bootstrap(App, [HTTP_PROVIDERS, {provide: RequestOptions, useClass: MyOptions}]);
* ```
*
* The options could also be extended when manually creating a {\@link Request}
* object.
*
* ### Example ([live demo](http://plnkr.co/edit/oyBoEvNtDhOSfi9YxaVb?p=preview))
*
* ```
* import {BaseRequestOptions, Request, RequestMethod} from '\@angular/http';
*
* var options = new BaseRequestOptions();
* var req = new Request(options.merge({
* method: RequestMethod.Post,
* url: 'https://google.com'
* }));
* console.log('req.method:', RequestMethod[req.method]); // Post
* console.log('options.url:', options.url); // null
* console.log('req.url:', req.url); // https://google.com
* ```
*
* \@experimental
*/

@@ -249,0 +251,0 @@ export var BaseRequestOptions = (function (_super) {

@@ -17,27 +17,28 @@ /**

/**
* Creates a response options object to be optionally provided when instantiating a
* {@link Response}.
* *
* This class is based on the `ResponseInit` description in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#responseinit).
* *
* All values are null by default. Typical defaults can be found in the
* {@link BaseResponseOptions} class, which sub-classes `ResponseOptions`.
* *
* This class may be used in tests to build {@link Response Responses} for
* mock responses (see {@link MockBackend}).
* *
* ### Example ([live demo](http://plnkr.co/edit/P9Jkk8e8cz6NVzbcxEsD?p=preview))
* *
* ```typescript
* import {ResponseOptions, Response} from '@angular/http';
* *
* var options = new ResponseOptions({
* body: '{"name":"Jeff"}'
* });
* var res = new Response(options);
* *
* console.log('res.json():', res.json()); // Object {name: "Jeff"}
* ```
* *
* Creates a response options object to be optionally provided when instantiating a
* {\@link Response}.
*
* This class is based on the `ResponseInit` description in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#responseinit).
*
* All values are null by default. Typical defaults can be found in the
* {\@link BaseResponseOptions} class, which sub-classes `ResponseOptions`.
*
* This class may be used in tests to build {\@link Response Responses} for
* mock responses (see {\@link MockBackend}).
*
* ### Example ([live demo](http://plnkr.co/edit/P9Jkk8e8cz6NVzbcxEsD?p=preview))
*
* ```typescript
* import {ResponseOptions, Response} from '\@angular/http';
*
* var options = new ResponseOptions({
* body: '{"name":"Jeff"}'
* });
* var res = new Response(options);
*
* console.log('res.json():', res.json()); // Object {name: "Jeff"}
* ```
*
* \@experimental
*/

@@ -58,25 +59,25 @@ export var ResponseOptions = (function () {

/**
* Creates a copy of the `ResponseOptions` instance, using the optional input as values to
* override
* existing values. This method will not change the values of the instance on which it is being
* called.
* *
* This may be useful when sharing a base `ResponseOptions` object inside tests,
* where certain properties may change from test to test.
* *
* ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))
* *
* ```typescript
* import {ResponseOptions, Response} from '@angular/http';
* *
* var options = new ResponseOptions({
* body: {name: 'Jeff'}
* });
* var res = new Response(options.merge({
* url: 'https://google.com'
* }));
* console.log('options.url:', options.url); // null
* console.log('res.json():', res.json()); // Object {name: "Jeff"}
* console.log('res.url:', res.url); // https://google.com
* ```
* Creates a copy of the `ResponseOptions` instance, using the optional input as values to
* override
* existing values. This method will not change the values of the instance on which it is being
* called.
*
* This may be useful when sharing a base `ResponseOptions` object inside tests,
* where certain properties may change from test to test.
*
* ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))
*
* ```typescript
* import {ResponseOptions, Response} from '\@angular/http';
*
* var options = new ResponseOptions({
* body: {name: 'Jeff'}
* });
* var res = new Response(options.merge({
* url: 'https://google.com'
* }));
* console.log('options.url:', options.url); // null
* console.log('res.json():', res.json()); // Object {name: "Jeff"}
* console.log('res.url:', res.url); // https://google.com
* ```
* @param {?=} options

@@ -99,3 +100,3 @@ * @return {?}

/**
* String, Object, ArrayBuffer or Blob representing the body of the {@link Response}.
* String, Object, ArrayBuffer or Blob representing the body of the {\@link Response}.
* @type {?}

@@ -105,3 +106,3 @@ */

/**
* Http {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html status code}
* Http {\@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html status code}
* associated with the response.

@@ -112,9 +113,15 @@ * @type {?}

/**
* Response {@link Headers headers}
* Response {\@link Headers headers}
* @type {?}
*/
ResponseOptions.prototype.headers;
/** @type {?} */
/**
* \@internal
* @type {?}
*/
ResponseOptions.prototype.statusText;
/** @type {?} */
/**
* \@internal
* @type {?}
*/
ResponseOptions.prototype.type;

@@ -125,45 +132,46 @@ /** @type {?} */

/**
* Subclass of {@link ResponseOptions}, with default values.
* *
* Default values:
* * status: 200
* * headers: empty {@link Headers} object
* *
* This class could be extended and bound to the {@link ResponseOptions} class
* when configuring an {@link Injector}, in order to override the default options
* used by {@link Http} to create {@link Response Responses}.
* *
* ### Example ([live demo](http://plnkr.co/edit/qv8DLT?p=preview))
* *
* ```typescript
* import {provide} from '@angular/core';
* import {bootstrap} from '@angular/platform-browser/browser';
* import {HTTP_PROVIDERS, Headers, Http, BaseResponseOptions, ResponseOptions} from
* '@angular/http';
* import {App} from './myapp';
* *
* class MyOptions extends BaseResponseOptions {
* headers:Headers = new Headers({network: 'github'});
* }
* *
* bootstrap(App, [HTTP_PROVIDERS, {provide: ResponseOptions, useClass: MyOptions}]);
* ```
* *
* The options could also be extended when manually creating a {@link Response}
* object.
* *
* ### Example ([live demo](http://plnkr.co/edit/VngosOWiaExEtbstDoix?p=preview))
* *
* ```
* import {BaseResponseOptions, Response} from '@angular/http';
* *
* var options = new BaseResponseOptions();
* var res = new Response(options.merge({
* body: 'Angular',
* headers: new Headers({framework: 'angular'})
* }));
* console.log('res.headers.get("framework"):', res.headers.get('framework')); // angular
* console.log('res.text():', res.text()); // Angular;
* ```
* *
* Subclass of {\@link ResponseOptions}, with default values.
*
* Default values:
* * status: 200
* * headers: empty {\@link Headers} object
*
* This class could be extended and bound to the {\@link ResponseOptions} class
* when configuring an {\@link Injector}, in order to override the default options
* used by {\@link Http} to create {\@link Response Responses}.
*
* ### Example ([live demo](http://plnkr.co/edit/qv8DLT?p=preview))
*
* ```typescript
* import {provide} from '\@angular/core';
* import {bootstrap} from '\@angular/platform-browser/browser';
* import {HTTP_PROVIDERS, Headers, Http, BaseResponseOptions, ResponseOptions} from
* '\@angular/http';
* import {App} from './myapp';
*
* class MyOptions extends BaseResponseOptions {
* headers:Headers = new Headers({network: 'github'});
* }
*
* bootstrap(App, [HTTP_PROVIDERS, {provide: ResponseOptions, useClass: MyOptions}]);
* ```
*
* The options could also be extended when manually creating a {\@link Response}
* object.
*
* ### Example ([live demo](http://plnkr.co/edit/VngosOWiaExEtbstDoix?p=preview))
*
* ```
* import {BaseResponseOptions, Response} from '\@angular/http';
*
* var options = new BaseResponseOptions();
* var res = new Response(options.merge({
* body: 'Angular',
* headers: new Headers({framework: 'angular'})
* }));
* console.log('res.headers.get("framework"):', res.headers.get('framework')); // angular
* console.log('res.text():', res.text()); // Angular;
* ```
*
* \@experimental
*/

@@ -170,0 +178,0 @@ export var BaseResponseOptions = (function (_super) {

@@ -11,4 +11,4 @@ /**

/**
* HTTP request body used by both {@link Request} and {@link Response}
* https://fetch.spec.whatwg.org/#body
* HTTP request body used by both {\@link Request} and {\@link Response}
* https://fetch.spec.whatwg.org/#body
* @abstract

@@ -20,3 +20,3 @@ */

/**
* Attempts to return body as parsed `JSON` object, or raises an exception.
* Attempts to return body as parsed `JSON` object, or raises an exception.
* @return {?}

@@ -34,3 +34,3 @@ */

/**
* Returns the body as a string, presuming `toString()` can be called on the response body.
* Returns the body as a string, presuming `toString()` can be called on the response body.
* @return {?}

@@ -54,3 +54,3 @@ */

/**
* Return the body as an ArrayBuffer
* Return the body as an ArrayBuffer
* @return {?}

@@ -65,3 +65,3 @@ */

/**
* Returns the request's body as a Blob, assuming that body exists.
* Returns the request's body as a Blob, assuming that body exists.
* @return {?}

@@ -81,5 +81,8 @@ */

function Body_tsickle_Closure_declarations() {
/** @type {?} */
/**
* \@internal
* @type {?}
*/
Body.prototype._body;
}
//# sourceMappingURL=body.js.map
/**
* Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as
* specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class).
* *
* The only known difference between this `Headers` implementation and the spec is the
* lack of an `entries` method.
* *
* ### Example
* *
* ```
* import {Headers} from '@angular/http';
* *
* var firstHeaders = new Headers();
* firstHeaders.append('Content-Type', 'image/jpeg');
* console.log(firstHeaders.get('Content-Type')) //'image/jpeg'
* *
* // Create headers from Plain Old JavaScript Object
* var secondHeaders = new Headers({
* 'X-My-Custom-Header': 'Angular'
* });
* console.log(secondHeaders.get('X-My-Custom-Header')); //'Angular'
* *
* var thirdHeaders = new Headers(secondHeaders);
* console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'
* ```
* *
* Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as
* specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class).
*
* The only known difference between this `Headers` implementation and the spec is the
* lack of an `entries` method.
*
* ### Example
*
* ```
* import {Headers} from '\@angular/http';
*
* var firstHeaders = new Headers();
* firstHeaders.append('Content-Type', 'image/jpeg');
* console.log(firstHeaders.get('Content-Type')) //'image/jpeg'
*
* // Create headers from Plain Old JavaScript Object
* var secondHeaders = new Headers({
* 'X-My-Custom-Header': 'Angular'
* });
* console.log(secondHeaders.get('X-My-Custom-Header')); //'Angular'
*
* var thirdHeaders = new Headers(secondHeaders);
* console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'
* ```
*
* \@experimental
*/

@@ -54,3 +55,3 @@ export var Headers = (function () {

/**
* Returns a new Headers instance from the given DOMString of Response Headers
* Returns a new Headers instance from the given DOMString of Response Headers
* @param {?} headersString

@@ -72,3 +73,3 @@ * @return {?}

/**
* Appends a header to existing list of header values for a given header name.
* Appends a header to existing list of header values for a given header name.
* @param {?} name

@@ -88,3 +89,3 @@ * @param {?} value

/**
* Deletes all header values for the given name.
* Deletes all header values for the given name.
* @param {?} name

@@ -107,3 +108,3 @@ * @return {?}

/**
* Returns first header that matches given name.
* Returns first header that matches given name.
* @param {?} name

@@ -120,3 +121,3 @@ * @return {?}

/**
* Checks for existence of header by given name.
* Checks for existence of header by given name.
* @param {?} name

@@ -127,3 +128,3 @@ * @return {?}

/**
* Returns the names of the headers
* Returns the names of the headers
* @return {?}

@@ -133,3 +134,3 @@ */

/**
* Sets or overrides header value for given name.
* Sets or overrides header value for given name.
* @param {?} name

@@ -151,3 +152,3 @@ * @param {?} value

/**
* Returns values of all headers.
* Returns values of all headers.
* @return {?}

@@ -170,3 +171,3 @@ */

/**
* Returns list of header values for a given name.
* Returns list of header values for a given name.
* @param {?} name

@@ -179,3 +180,3 @@ * @return {?}

/**
* This method is not implemented.
* This method is not implemented.
* @return {?}

@@ -197,7 +198,13 @@ */

function Headers_tsickle_Closure_declarations() {
/** @type {?} */
/**
* \@internal header names are lower case
* @type {?}
*/
Headers.prototype._headers;
/** @type {?} */
/**
* \@internal map lower case names to actual names
* @type {?}
*/
Headers.prototype._normalizedNames;
}
//# sourceMappingURL=headers.js.map

@@ -40,4 +40,5 @@ /**

/**
* The module that includes http's providers
* *
* The module that includes http's providers
*
* \@experimental
*/

@@ -75,4 +76,5 @@ export var HttpModule = (function () {

/**
* The module that includes jsonp's providers
* *
* The module that includes jsonp's providers
*
* \@experimental
*/

@@ -79,0 +81,0 @@ export var JsonpModule = (function () {

@@ -50,58 +50,60 @@ /**

/**
* Performs http requests using `XMLHttpRequest` as the default backend.
* *
* `Http` is available as an injectable class, with methods to perform http requests. Calling
* `request` returns an `Observable` which will emit a single {@link Response} when a
* response is received.
* *
* ### Example
* *
* ```typescript
* import {Http, HTTP_PROVIDERS} from '@angular/http';
* import 'rxjs/add/operator/map'
* selector: 'http-app',
* viewProviders: [HTTP_PROVIDERS],
* templateUrl: 'people.html'
* })
* class PeopleComponent {
* constructor(http: Http) {
* http.get('people.json')
* // Call map on the response observable to get the parsed people object
* .map(res => res.json())
* // Subscribe to the observable to get the parsed people object and attach it to the
* // component
* .subscribe(people => this.people = people);
* }
* }
* ```
* *
* *
* ### Example
* *
* ```
* http.get('people.json').subscribe((res:Response) => this.people = res.json());
* ```
* *
* The default construct used to perform requests, `XMLHttpRequest`, is abstracted as a "Backend" (
* {@link XHRBackend} in this case), which could be mocked with dependency injection by replacing
* the {@link XHRBackend} provider, as in the following example:
* *
* ### Example
* *
* ```typescript
* import {BaseRequestOptions, Http} from '@angular/http';
* import {MockBackend} from '@angular/http/testing';
* var injector = Injector.resolveAndCreate([
* BaseRequestOptions,
* MockBackend,
* {provide: Http, useFactory:
* function(backend, defaultOptions) {
* return new Http(backend, defaultOptions);
* },
* deps: [MockBackend, BaseRequestOptions]}
* ]);
* var http = injector.get(Http);
* http.get('request-from-mock-backend.json').subscribe((res:Response) => doSomething(res));
* ```
* *
* Performs http requests using `XMLHttpRequest` as the default backend.
*
* `Http` is available as an injectable class, with methods to perform http requests. Calling
* `request` returns an `Observable` which will emit a single {\@link Response} when a
* response is received.
*
* ### Example
*
* ```typescript
* import {Http, HTTP_PROVIDERS} from '\@angular/http';
* import 'rxjs/add/operator/map'
* \@Component({
* selector: 'http-app',
* viewProviders: [HTTP_PROVIDERS],
* templateUrl: 'people.html'
* })
* class PeopleComponent {
* constructor(http: Http) {
* http.get('people.json')
* // Call map on the response observable to get the parsed people object
* .map(res => res.json())
* // Subscribe to the observable to get the parsed people object and attach it to the
* // component
* .subscribe(people => this.people = people);
* }
* }
* ```
*
*
* ### Example
*
* ```
* http.get('people.json').subscribe((res:Response) => this.people = res.json());
* ```
*
* The default construct used to perform requests, `XMLHttpRequest`, is abstracted as a "Backend" (
* {\@link XHRBackend} in this case), which could be mocked with dependency injection by replacing
* the {\@link XHRBackend} provider, as in the following example:
*
* ### Example
*
* ```typescript
* import {BaseRequestOptions, Http} from '\@angular/http';
* import {MockBackend} from '\@angular/http/testing';
* var injector = Injector.resolveAndCreate([
* BaseRequestOptions,
* MockBackend,
* {provide: Http, useFactory:
* function(backend, defaultOptions) {
* return new Http(backend, defaultOptions);
* },
* deps: [MockBackend, BaseRequestOptions]}
* ]);
* var http = injector.get(Http);
* http.get('request-from-mock-backend.json').subscribe((res:Response) => doSomething(res));
* ```
*
* \@experimental
*/

@@ -118,6 +120,6 @@ export var Http = (function () {

/**
* Performs any type of http request. First argument is required, and can either be a url or
* a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}
* object can be provided as the 2nd argument. The options object will be merged with the values
* of {@link BaseRequestOptions} before performing the request.
* Performs any type of http request. First argument is required, and can either be a url or
* a {\@link Request} instance. If the first argument is a url, an optional {\@link RequestOptions}
* object can be provided as the 2nd argument. The options object will be merged with the values
* of {\@link BaseRequestOptions} before performing the request.
* @param {?} url

@@ -141,3 +143,3 @@ * @param {?=} options

/**
* Performs a request with `get` http method.
* Performs a request with `get` http method.
* @param {?} url

@@ -151,3 +153,3 @@ * @param {?=} options

/**
* Performs a request with `post` http method.
* Performs a request with `post` http method.
* @param {?} url

@@ -162,3 +164,3 @@ * @param {?} body

/**
* Performs a request with `put` http method.
* Performs a request with `put` http method.
* @param {?} url

@@ -173,3 +175,3 @@ * @param {?} body

/**
* Performs a request with `delete` http method.
* Performs a request with `delete` http method.
* @param {?} url

@@ -183,3 +185,3 @@ * @param {?=} options

/**
* Performs a request with `patch` http method.
* Performs a request with `patch` http method.
* @param {?} url

@@ -194,3 +196,3 @@ * @param {?} body

/**
* Performs a request with `head` http method.
* Performs a request with `head` http method.
* @param {?} url

@@ -204,3 +206,3 @@ * @param {?=} options

/**
* Performs a request with `options` http method.
* Performs a request with `options` http method.
* @param {?} url

@@ -237,3 +239,3 @@ * @param {?=} options

/**
* @experimental
* \@experimental
*/

@@ -250,13 +252,14 @@ export var Jsonp = (function (_super) {

/**
* Performs any type of http request. First argument is required, and can either be a url or
* a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}
* object can be provided as the 2nd argument. The options object will be merged with the values
* of {@link BaseRequestOptions} before performing the request.
* *
* supported by all current browsers. Because JSONP creates a `<script>` element with
* contents retrieved from a remote source, attacker-controlled data introduced by an untrusted
* source could expose your application to XSS risks. Data exposed by JSONP may also be
* readable by malicious third-party websites. In addition, JSONP introduces potential risk for
* future security issues (e.g. content sniffing). For more detail, see the
* [Security Guide](http://g.co/ng/security).
* Performs any type of http request. First argument is required, and can either be a url or
* a {\@link Request} instance. If the first argument is a url, an optional {\@link RequestOptions}
* object can be provided as the 2nd argument. The options object will be merged with the values
* of {\@link BaseRequestOptions} before performing the request.
*
* \@security Regular XHR is the safest alternative to JSONP for most applications, and is
* supported by all current browsers. Because JSONP creates a `<script>` element with
* contents retrieved from a remote source, attacker-controlled data introduced by an untrusted
* source could expose your application to XSS risks. Data exposed by JSONP may also be
* readable by malicious third-party websites. In addition, JSONP introduces potential risk for
* future security issues (e.g. content sniffing). For more detail, see the
* [Security Guide](http://g.co/ng/security).
* @param {?} url

@@ -263,0 +266,0 @@ * @param {?=} options

@@ -9,7 +9,8 @@ /**

/**
* Abstract class from which real backends are derived.
* *
* The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given
* {@link Request}.
* *
* Abstract class from which real backends are derived.
*
* The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given
* {\@link Request}.
*
* \@experimental
* @abstract

@@ -29,4 +30,5 @@ */

/**
* Abstract class from which real connections are derived.
* *
* Abstract class from which real connections are derived.
*
* \@experimental
* @abstract

@@ -48,4 +50,5 @@ */

/**
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.
* *
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.
*
* \@experimental
* @abstract

@@ -52,0 +55,0 @@ */

@@ -83,1 +83,2 @@ /**

}
export declare const ArrayBuffer: any;

@@ -19,37 +19,39 @@ /**

/**
* Creates `Request` instances from provided values.
* *
* The Request's interface is inspired by the Request constructor defined in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#request-class),
* but is considered a static value whose body can be accessed many times. There are other
* differences in the implementation, but this is the most significant.
* *
* `Request` instances are typically created by higher-level classes, like {@link Http} and
* {@link Jsonp}, but it may occasionally be useful to explicitly create `Request` instances.
* One such example is when creating services that wrap higher-level services, like {@link Http},
* where it may be useful to generate a `Request` with arbitrary headers and search params.
* *
* ```typescript
* import {Injectable, Injector} from '@angular/core';
* import {HTTP_PROVIDERS, Http, Request, RequestMethod} from '@angular/http';
* *
* class AutoAuthenticator {
* constructor(public http:Http) {}
* request(url:string) {
* return this.http.request(new Request({
* method: RequestMethod.Get,
* url: url,
* search: 'password=123'
* }));
* }
* }
* *
* var injector = Injector.resolveAndCreate([HTTP_PROVIDERS, AutoAuthenticator]);
* var authenticator = injector.get(AutoAuthenticator);
* authenticator.request('people.json').subscribe(res => {
* //URL should have included '?password=123'
* console.log('people', res.json());
* });
* ```
* *
* Creates `Request` instances from provided values.
*
* The Request's interface is inspired by the Request constructor defined in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#request-class),
* but is considered a static value whose body can be accessed many times. There are other
* differences in the implementation, but this is the most significant.
*
* `Request` instances are typically created by higher-level classes, like {\@link Http} and
* {\@link Jsonp}, but it may occasionally be useful to explicitly create `Request` instances.
* One such example is when creating services that wrap higher-level services, like {\@link Http},
* where it may be useful to generate a `Request` with arbitrary headers and search params.
*
* ```typescript
* import {Injectable, Injector} from '\@angular/core';
* import {HTTP_PROVIDERS, Http, Request, RequestMethod} from '\@angular/http';
*
* \@Injectable()
* class AutoAuthenticator {
* constructor(public http:Http) {}
* request(url:string) {
* return this.http.request(new Request({
* method: RequestMethod.Get,
* url: url,
* search: 'password=123'
* }));
* }
* }
*
* var injector = Injector.resolveAndCreate([HTTP_PROVIDERS, AutoAuthenticator]);
* var authenticator = injector.get(AutoAuthenticator);
* authenticator.request('people.json').subscribe(res => {
* //URL should have included '?password=123'
* console.log('people', res.json());
* });
* ```
*
* \@experimental
*/

@@ -87,3 +89,3 @@ export var Request = (function (_super) {

/**
* Returns the content type enum based on header options.
* Returns the content type enum based on header options.
* @return {?}

@@ -103,3 +105,3 @@ */

case 'application/octet-stream':
return ContentType.BLOB;
return this._body instanceof ArrayBuffer ? ContentType.ARRAY_BUFFER : ContentType.BLOB;
default:

@@ -110,3 +112,3 @@ return this.detectContentTypeFromBody();

/**
* Returns the content type of request's body based on its type.
* Returns the content type of request's body based on its type.
* @return {?}

@@ -130,3 +132,3 @@ */

}
else if (this._body && typeof this._body == 'object') {
else if (this._body && typeof this._body === 'object') {
return ContentType.JSON;

@@ -139,4 +141,4 @@ }

/**
* Returns the request's body according to its type. If body is undefined, return
* null.
* Returns the request's body according to its type. If body is undefined, return
* null.
* @return {?}

@@ -171,3 +173,3 @@ */

/**
* {@link Headers} instance
* {\@link Headers} instance
* @type {?}

@@ -201,3 +203,3 @@ */

var /** @type {?} */ Blob = ((w) /** TODO #9100 */)['Blob'] || noop;
var /** @type {?} */ ArrayBuffer = ((w) /** TODO #9100 */)['ArrayBuffer'] || noop;
export var /** @type {?} */ ArrayBuffer = ((w) /** TODO #9100 */)['ArrayBuffer'] || noop;
//# sourceMappingURL=static_request.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"Request":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./body","name":"Body"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./interfaces","name":"RequestArgs"}]}],"detectContentType":[{"__symbolic":"method"}],"detectContentTypeFromBody":[{"__symbolic":"method"}],"getBody":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"Request":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./body","name":"Body"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./interfaces","name":"RequestArgs"}]}],"detectContentType":[{"__symbolic":"method"}],"detectContentTypeFromBody":[{"__symbolic":"method"}],"getBody":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"Request":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./body","name":"Body"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./interfaces","name":"RequestArgs"}]}],"detectContentType":[{"__symbolic":"method"}],"detectContentTypeFromBody":[{"__symbolic":"method"}],"getBody":[{"__symbolic":"method"}]}},"ArrayBuffer":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"error","message":"Expression form not supported","line":169,"character":28},"right":{"__symbolic":"error","message":"Reference to a local symbol","line":165,"character":6,"context":{"name":"noop"}}}}},{"__symbolic":"module","version":1,"metadata":{"Request":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./body","name":"Body"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./interfaces","name":"RequestArgs"}]}],"detectContentType":[{"__symbolic":"method"}],"detectContentTypeFromBody":[{"__symbolic":"method"}],"getBody":[{"__symbolic":"method"}]}},"ArrayBuffer":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"error","message":"Expression form not supported","line":169,"character":28},"right":{"__symbolic":"error","message":"Reference to a local symbol","line":165,"character":6,"context":{"name":"noop"}}}}}]

@@ -34,3 +34,3 @@ /**

/**
* One of "basic", "cors", "default", "error, or "opaque".
* One of "basic", "cors", "default", "error", or "opaque".
*

@@ -37,0 +37,0 @@ * Defaults to "default".

@@ -15,19 +15,20 @@ /**

/**
* Creates `Response` instances from provided values.
* *
* Though this object isn't
* usually instantiated by end-users, it is the primary object interacted with when it comes time to
* add data to a view.
* *
* ### Example
* *
* ```
* http.request('my-friends.txt').subscribe(response => this.friends = response.text());
* ```
* *
* The Response's interface is inspired by the Response constructor defined in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body
* can be accessed many times. There are other differences in the implementation, but this is the
* most significant.
* *
* Creates `Response` instances from provided values.
*
* Though this object isn't
* usually instantiated by end-users, it is the primary object interacted with when it comes time to
* add data to a view.
*
* ### Example
*
* ```
* http.request('my-friends.txt').subscribe(response => this.friends = response.text());
* ```
*
* The Response's interface is inspired by the Response constructor defined in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body
* can be accessed many times. There are other differences in the implementation, but this is the
* most significant.
*
* \@experimental
*/

@@ -59,4 +60,4 @@ export var Response = (function (_super) {

/**
* One of "basic", "cors", "default", "error, or "opaque".
* *
* One of "basic", "cors", "default", "error", or "opaque".
*
* Defaults to "default".

@@ -73,3 +74,3 @@ * @type {?}

* URL of response.
* *
*
* Defaults to empty string.

@@ -81,3 +82,3 @@ * @type {?}

* Status code returned by server.
* *
*
* Defaults to 200.

@@ -90,3 +91,3 @@ * @type {?}

* section 6.1.1](https://tools.ietf.org/html/rfc2616#section-6.1.1)
* *
*
* Defaults to "OK"

@@ -98,3 +99,3 @@ * @type {?}

* Non-standard property
* *
*
* Denotes how many of the response body's bytes have been loaded, for example if the response is

@@ -107,3 +108,3 @@ * the result of a progress event.

* Non-standard property
* *
*
* Denotes how many bytes are expected in the final response body.

@@ -110,0 +111,0 @@ * @type {?}

/**
* @license undefined
* Copyright Google Inc. All Rights Reserved.
* *
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @param {?=} rawParams

@@ -26,3 +26,4 @@ * @return {?}

/**
* *
* \@experimental
*
*/

@@ -61,34 +62,35 @@ export var QueryEncoder = (function () {

/**
* Map-like representation of url search parameters, based on
* [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard,
* with several extensions for merging URLSearchParams objects:
* - setAll()
* - appendAll()
* - replaceAll()
* *
* This class accepts an optional second parameter of ${@link QueryEncoder},
* which is used to serialize parameters before making a request. By default,
* `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`,
* and then un-encodes certain characters that are allowed to be part of the query
* according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986.
* *
* These are the characters that are not encoded: `! $ \' ( ) * + , ; A 9 - . _ ~ ? /`
* *
* If the set of allowed query characters is not acceptable for a particular backend,
* `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams.
* *
* ```
* import {URLSearchParams, QueryEncoder} from '@angular/http';
* class MyQueryEncoder extends QueryEncoder {
* encodeKey(k: string): string {
* return myEncodingFunction(k);
* }
* *
* encodeValue(v: string): string {
* return myEncodingFunction(v);
* }
* }
* *
* let params = new URLSearchParams('', new MyQueryEncoder());
* ```
* Map-like representation of url search parameters, based on
* [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard,
* with several extensions for merging URLSearchParams objects:
* - setAll()
* - appendAll()
* - replaceAll()
*
* This class accepts an optional second parameter of ${\@link QueryEncoder},
* which is used to serialize parameters before making a request. By default,
* `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`,
* and then un-encodes certain characters that are allowed to be part of the query
* according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986.
*
* These are the characters that are not encoded: `! $ \' ( ) * + , ; A 9 - . _ ~ ? /`
*
* If the set of allowed query characters is not acceptable for a particular backend,
* `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams.
*
* ```
* import {URLSearchParams, QueryEncoder} from '\@angular/http';
* class MyQueryEncoder extends QueryEncoder {
* encodeKey(k: string): string {
* return myEncodingFunction(k);
* }
*
* encodeValue(v: string): string {
* return myEncodingFunction(v);
* }
* }
*
* let params = new URLSearchParams('', new MyQueryEncoder());
* ```
* \@experimental
*/

@@ -95,0 +97,0 @@ export var URLSearchParams = (function () {

@@ -12,3 +12,3 @@ /**

*/
export var /** @type {?} */ VERSION = new Version('4.0.0-beta.3');
export var /** @type {?} */ VERSION = new Version('4.0.0-beta.4');
//# sourceMappingURL=version.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.3"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.3"]}}}]
[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.4"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.4"]}}}]

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc