3.2.0

AW.HTTP.Request question

Hi,
I am posting a URL using AW.HTTP.Request method to a server.
var r = new AW.HTTP.Request;
r.setRequestMethod("POST");
r.request();
r.response = function(data){
}

When this request is waiting for the response from server, if the server response is more than 50 seconds, the request (IE browser) timesout and I get "undefined" response, but when the server responds within 50 seconds, I get a valid response.

I am not sure if it has anything to set with setAsync(false) or setAsync (true). I believe the default is asysnchronous mode. Or is there any other parameter which needs to be set, which I am missing?

Can you please provide your inputs on how to handle this timeout.

Thanks
VJ
VJ
October 23,
One point I missed here, our webserver timeout is set to 300 secs.
But it timesout in 50 secs.

Thanks
VJ
VJ
October 23,
As far as I know it is not possible to set timeout on 'normal' XMLHttpRequest object in IE. It is possible with 'ServerHttpRequest', but you cannot use it in a browser.
Alex (ActiveWidgets)
October 23,
Thanks Alex for your quick response.

I went through your documentation for "async". It states
"Normally AW.HTTP.Request makes asynchronous calls and returns results after some delay in response() callback. Setting async to false makes a synchronous request and the request() method does not return until the result is received and the response() method is called."

Since by default the request is asynchronous, this call returns after "some" delay. But synchronous call waits till the result is received.

Currently I am not using setAsync() method at all.

Do you know what would that "some" delay signify? or is it advisable to set the "setAsync(false)"?

Please let me know your comments.

Thanks
VJ
VJ
October 24,

This topic is archived.

See also:


Back to support forum