X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/docs/source/Api.html diff --git a/docs/source/Api.html b/docs/source/Api.html index b20cb47e..ead75757 100644 --- a/docs/source/Api.html +++ b/docs/source/Api.html @@ -1,12 +1,18 @@ - - - - The source code - - - - -
+
+
+      
+  The source code
+    
+    
+
+
+    
/*!
+ * Ext JS Library 3.2.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
 
/** * @class Ext.data.Api * @extends Object @@ -67,8 +73,7 @@ restActions : {
/** * Returns true if supplied action-name is a valid API action defined in {@link #actions} constants - * @param {String} action - * @param {String[]}(Optional) List of available CRUD actions. Pass in list when executing multiple times for efficiency. + * @param {String} action Action to test for availability. * @return {Boolean} */ isAction : function(action) { @@ -100,7 +105,7 @@ restActions : {
/** * Returns true if the supplied API is valid; that is, check that all keys match defined actions * otherwise returns an array of mistakes. - * @return {String[]||true} + * @return {String[]|true} */ isValid : function(api){ var invalid = []; @@ -186,7 +191,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 +208,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 +259,7 @@ Ext.data.Response.prototype = { return this.success; }, getStatus : function() { - return this.status + return this.status; }, getRoot : function() { return this.root; @@ -280,6 +291,6 @@ Ext.apply(Ext.data.Api.Error.prototype, { }); -
- +
+ \ No newline at end of file