View Full Version : Ext.Ajax.request -- params length limit?

18 Feb 2010, 3:39 PM

I'm trying to use the Ext.Ajax.request method to perform an HTTP PUT. If I use a string with length greater than 1000, the request isn't sent and I receive a response of "communication failed". The request does not register in firebug.

If I use a string with a length of less than 1000, the request sends and registers in firebug.

I'm using params: because xmlData: overrides the header to POST and the request fails. Is there a workaround, or something I'm missing? Any help is greatly appreaciated. Thanks!

Here's the code I'm trying:

method: 'PUT',

params: (xml of length 4000+) ,

url: '(removed)',
success: function(result, request) {
message('Your save was successful', MESSAGE_TYPE_SUCCESS);

failure: function(result, request) {
var errorMessage;
errorMessage = result.responseXML.getElementsByTagName("description")[0].childNodes[0].nodeValue;
errorMessage = result.statusText;
errorMessage = "Your policy could not be saved at this time";

18 Feb 2010, 4:02 PM
I think it fails because the PUT, is POST. And btw, the POST is by default, you don't need to specify

"The default HTTP method to be used for requests. Note that this is case-sensitive and should be all caps (defaults to undefined; if not set but params are present will use "POST", otherwise will use "GET".)"

The GET only accept 1024 chars or something like that. And that is not related to ExtJs