From f5a075fe99a27ef46695c802b813f8b173fc9f4b Mon Sep 17 00:00:00 2001 From: "Steve L. Nyemba" Date: Fri, 11 Sep 2015 01:48:48 -0400 Subject: [PATCH] refactoring and improving interfaces @TODO: add upload file handling --- rpc.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpc.js b/rpc.js index 8b7bb68..c66d303 100755 --- a/rpc.js +++ b/rpc.js @@ -112,6 +112,15 @@ jx.ajax.get.instance = function(){ } + this.put = function(url,callback){ + this.send(url,callback,'PUT') ; + } + this.get = function(url,callback){ + this.send(url,callback,'GET') ; + } + this.post = function(url,callback){ + this.send(url,callback,'POST') ; + } }//-- end of the factory method return new factory() ; } @@ -119,3 +128,4 @@ jx.ajax.get.instance = function(){ // // backward compatibility jx.ajax.getInstance = jx.ajax.get.instance ; +HttpClient = jx.ajax.get ;