Upgrade to ExtJS 3.1.1 - Released 02/08/2010
[extjs.git] / docs / source / Api.html
index b20cb47..5521c9c 100644 (file)
@@ -186,7 +186,8 @@ new Ext.data.HttpProxy({
         restify : function(proxy) {
             proxy.restful = true;
             for (var verb in this.restActions) {
-                proxy.api[this.actions[verb]].method = this.restActions[verb];
+                proxy.api[this.actions[verb]].method ||
+                    (proxy.api[this.actions[verb]].method = this.restActions[verb]);
             }
             // TODO: perhaps move this interceptor elsewhere?  like into DataProxy, perhaps?  Placed here
             // to satisfy initial 3.0 final release of REST features.
@@ -202,7 +203,12 @@ new Ext.data.HttpProxy({
                         return true;
                         break;
                     case 201:   // entity created but no response returned
-                        res.success = true;
+                        if (Ext.isEmpty(res.raw.responseText)) {
+                          res.success = true;
+                        } else {
+                          //if the response contains data, treat it like a 200
+                          return true;
+                        }
                         break;
                     case 204:  // no-content.  Create a fake response.
                         res.success = true;
@@ -248,7 +254,7 @@ Ext.data.Response.prototype = {
         return this.success;
     },
     getStatus : function() {
-        return this.status
+        return this.status;
     },
     getRoot : function() {
         return this.root;