--- a/src/main/resources/scripts/Utils.js Fri Aug 26 11:39:26 2011 -0400
+++ b/src/main/resources/scripts/Utils.js Fri Aug 26 11:42:27 2011 -0400
@@ -159,9 +159,11 @@
},
// send information to the server as JSON
- postAsJSON : function (uri, data, successHandler, errorHandler) {
+ postAsJSON : function (uri, resource, successHandler, errorHandler) {
try {
- Util.post(uri, { contentType : "application/json", data : JSON.stringify(data) }, successHandler, errorHandler);
+ resource.contentType = "application/json";
+ resource.data = JSON.stringify(resource.data);
+ Util.post(uri, resource, successHandler, errorHandler);
} catch (e) {
errorHandler(e);
}