Skip to content
Browse files

Changes for jsgi-client refactor

  • Loading branch information...
1 parent c4d0ac8 commit 9545c60ac580dd08be8cba767ac2ba16b24a1623 @kriszyp kriszyp committed
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/store/remote.js
View
12 lib/store/remote.js
@@ -12,7 +12,7 @@ exports.Remote = function(request, contextUrl){
function remoteSubscribe(){
request({
method:"SUBSCRIBE",
- url: options.query
+ uri: options.query
}).then(notification, notification, function(message){
remoteSubscribe();
notification(message);
@@ -41,7 +41,7 @@ exports.Remote = function(request, contextUrl){
pathInfo: '/' + id,
});
- return JSONExt.parse(response.body);
+ return JSONExt.parse(response.body.join(""));
},
put: function(object, id){
id = id || object.getId ? object.getId() : object.id;
@@ -57,7 +57,7 @@ exports.Remote = function(request, contextUrl){
body: JSONExt.stringify(object)
});
return when(responsePromise, function(response){
- return JSONExt.parse(response.body)
+ return JSONExt.parse(response.body.join(""))
});
},
query: function(query, options){
@@ -73,13 +73,13 @@ exports.Remote = function(request, contextUrl){
queryString: query,
headers: headers
}), function(response){
- return JSONExt.parse(response.body)
+ return JSONExt.parse(response.body.join(""))
});
},
"delete": function(id){
return request({
method:"DELETE",
- url: pathInfo
+ uri: pathInfo
});
},
subscribe: function(options){
@@ -92,7 +92,7 @@ exports.Remote = function(request, contextUrl){
return store;
}
return entityStores[storeName] = Remote(function(req){
- req.url = storeName + '/' + req.url;
+ req.uri = storeName + '/' + req.uri;
return request(req);
})
}

0 comments on commit 9545c60

Please sign in to comment.
Something went wrong with that request. Please try again.