jquery - WebUrlLoaderClient : Synchronous request timed out after 10 -
i've been developing android application using phonegap. in app use xmlrpcrequest request. when make request, maybe due slow connection, request timed out , following error
e/weburlloaderclient(574): synchronous request timed out after 10 seconds 0th try
is there anyway "catch" error, or maybe increase timeout time??
i have same problem since updated phonegap 2.8.1, version using? not seem listen ajax argument timeout @ all:
var dataobj = { 'value': whatever'}; //navigator.notification.alert(json.stringify(dataobj)); $.ajax({ type: 'post', url: url, async: false, data: json.stringify(dataobj), datatype: 'json', timeout: 25000, contenttype: 'application/json; charset=utf-8', crossdomain: true, xhrfields: { withcredentials: true }, beforesend: function(xhr) { xhr.setrequestheader("authorization", "basic " + base64.encode(username + ":" + password)); }, success: post_succes, error: function(xhr, status, errthrown) { var out = "<br>error status " + status; out += "<br>error request status text: " + xhr.statustext; out += "<br>error request status: " + xhr.status; out += "<br>error request response text: " + xhr.responsetext; out += "<br>error response header: " + xhr.getallresponseheaders(); navigator.notification.alert(out); } });
i tried set value in java main: (i know not right property... desperate figuring out...)
super.setintegerproperty("loadurltimeoutvalue", 25000);
it keeps sticking 10 seconds....
Comments
Post a Comment