Ajax type calls across platforms
Monkey Forums/Monkey Programming/Ajax type calls across platforms
| ||
Can we please have some threaded HTTP(s) functionality. I'd like to be able to load content in the background and have events triggered when completed/exited/failed etc... Thanks |
| ||
Ditto - would be a really useful feature, (in particular on Android) |
| ||
Well... current design allows this. there's on loading and on update. OnLoading is triggered while images and media are being loaded, when this is finished, then OnUpdate and OnRender are called. So you can create a loading progress or whatever you need in your game. |
| ||
I've managed to put together a module that gives me the functionality I require. I will post it here when it's more complete as it only supports HTML5 targets right now. You call the functions like this : stream = New asyncStream() stream.getUrl("http://wwww.google.com", "q=1234" ) the follwing callbacks are triggerd: onConnectionEstablished: server connection established onRequestReceived: request received onRequestProcessing: processing request onRequestComplete(responseJSON$): request finished and response is ready & http status = 200 onRequestError : request failed |