Change URLLoader timeout

Is there a simple but not awful way to change timeout?
The only one I’ve found, I’m not really good with lime, is change timeout=30000 in timeout=whatIwant in class AbstractHTTPRequest implements _IHTTPRequest new method.

Is there a less awful way to procede?

Thanks in advance.
David.

1 Like

I believe lime.net.HTTPRequest allows you to set timeout directly

The Flash URLRequest API does not have a timeout field (though AIR has idleTimeout), but that’s why OpenFL does not have a URLRequest timeout field right now

With lime.net.HTTPRequest, you could use something like this:

var request = new HTTPRequest<String> ();
request.timeout = 60000;
request.load ("test.txt").onComplete (function (text) {
   trace ("Load complete: " + text);
}).onError (function (e) {
   trace (e);
});

You can use other class types as well, such as HTTPRequest<BitmapData> or HTTPRequest<ByteArray> too :slight_smile:

1 Like

Thanks a lot for suggestions!