summaryrefslogtreecommitdiff
path: root/lib/dojo/rpc/JsonService.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dojo/rpc/JsonService.js')
-rw-r--r--lib/dojo/rpc/JsonService.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dojo/rpc/JsonService.js b/lib/dojo/rpc/JsonService.js
index 5a755252f..a8bd416a1 100644
--- a/lib/dojo/rpc/JsonService.js
+++ b/lib/dojo/rpc/JsonService.js
@@ -1,8 +1,8 @@
/*
- Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
//>>built
-define("dojo/rpc/JsonService",["../main","./RpcService"],function(_1){_1.declare("dojo.rpc.JsonService",_1.rpc.RpcService,{bustCache:false,contentType:"application/json-rpc",lastSubmissionId:0,callRemote:function(_2,_3){var _4=new _1.Deferred();this.bind(_2,_3,_4);return _4;},bind:function(_5,_6,_7,_8){var _9=_1.rawXhrPost({url:_8||this.serviceUrl,postData:this.createRequest(_5,_6),contentType:this.contentType,timeout:this.timeout,handleAs:"json-comment-optional"});_9.addCallbacks(this.resultCallback(_7),this.errorCallback(_7));},createRequest:function(_a,_b){var _c={"params":_b,"method":_a,"id":++this.lastSubmissionId};return _1.toJson(_c);},parseResults:function(_d){if(_1.isObject(_d)){if("result" in _d){return _d.result;}if("Result" in _d){return _d.Result;}if("ResultSet" in _d){return _d.ResultSet;}}return _d;}});return _1.rpc.JsonService;}); \ No newline at end of file
+define("dojo/rpc/JsonService",["../_base/declare","../_base/Deferred","../_base/json","../_base/lang","../_base/xhr","./RpcService"],function(_1,_2,_3,_4,_5,_6){return _1("dojo.rpc.JsonService",_6,{bustCache:false,contentType:"application/json-rpc",lastSubmissionId:0,callRemote:function(_7,_8){var _9=new _2();this.bind(_7,_8,_9);return _9;},bind:function(_a,_b,_c,_d){var _e=_5.post({url:_d||this.serviceUrl,postData:this.createRequest(_a,_b),contentType:this.contentType,timeout:this.timeout,handleAs:"json-comment-optional"});_e.addCallbacks(this.resultCallback(_c),this.errorCallback(_c));},createRequest:function(_f,_10){var req={"params":_10,"method":_f,"id":++this.lastSubmissionId};return _3.toJson(req);},parseResults:function(obj){if(_4.isObject(obj)){if("result" in obj){return obj.result;}if("Result" in obj){return obj.Result;}if("ResultSet" in obj){return obj.ResultSet;}}return obj;}});}); \ No newline at end of file