I have a piece of code that works on most browsers except the Android browser. On Android if throws the following error: “Length Required”
Android OS: 2.2
jQuery: 1.5.1
$.ajax({
type: "put",
url: '/offers/' + offer.offer_data.id + '/delete_active',
success: function(){
alert('success');
},
error:function(XMLHttpRequest,textStatus, errorThrown) {
alert("Error status :"+textStatus);
alert("Error type :"+errorThrown);
alert("Error message :"+XMLHttpRequest.responseXML);
}
});
Thanks in advance.
Adding a dummy parameter data fixed the issue. Found the answer in this post http://weblogs.asp.net/gabriellopez/archive/2010/03/12/jquery-web-service-invocation-411-length-required-error.aspx