Async http.request?

Is there a way to get an async http request so that the GUI can go on while stuff is downloading in the background? Is there any point in wrapping the http.request inside a coroutine?

Thanks,
Marcus [import]uid: 4441 topic_id: 1172 reply_id: 301172[/import]

This is an old question… And I think it is a feature request already… But is there anybody working on that at ansca and is there some word about the ETA? Beta 8 9 10 11? [import]uid: 6928 topic_id: 1172 reply_id: 5042[/import]

Sorry, not for Beta 8. [import]uid: 7559 topic_id: 1172 reply_id: 5332[/import]

Hi, I’ve been hanging out for this too, could we have some confirmation that this will be available in the final release of 2.0 [import]uid: 6731 topic_id: 1172 reply_id: 5803[/import]

Unfortunately it didn’t make it into the upcoming Corona SDK release.

-Tom [import]uid: 7559 topic_id: 1172 reply_id: 5816[/import]

This is very disappointing. I believe the async function will be invaluable for business applications. I have developed a business application that loads in resources using http requests, and at the moment is very slow at loading because each file needs to be loaded in consecutively plus the GUI can’t show a loading animation since the loading process stops all animation, so involves a lot of trust on behalf of the user (to believe that the App has not frozen). [import]uid: 6731 topic_id: 1172 reply_id: 5833[/import]

WORD! Not only for Business stuff… (which I may write in Obj-C anywhay cause there is just to much native stuff missing in Corona) nearly everything which wants to check back with data on external servers is limited…

My game greatly bases on highscore / score comparison… this is information which does not has to stop the “flow” of playing the game itself. I did not fully complete the network related code because I am waiting for async access. Which I thought is on the road(map).

Sure I can finish my game with syncronous requests. But I fear that will create a bad experience for some players. And without it will be a lot less attractive for players.

So I hope this feature gets high priority in near future (together with SSL support!!!) [import]uid: 6928 topic_id: 1172 reply_id: 5837[/import]

+1 for making this a high-priority! [import]uid: 4621 topic_id: 1172 reply_id: 5845[/import]

Probably not the proper way to bump this (+1) but I have had to turn down some client apps that require this feature. Considering using Wax - they use (i believe their own) Httpotluck library to do async http requests. It is open source so Corona could include it but it is only half the equation for them (currently). [import]uid: 7587 topic_id: 1172 reply_id: 7148[/import]

I found a workaround. It’s not pretty, and I still very much would like official support for async http, but for now, check out: http://developer.anscamobile.com/code/corona-async-http [import]uid: 6795 topic_id: 1172 reply_id: 10043[/import]

Thanks for the workaround!
Yes, it’s not pretty and I’d prefer a native async function, however at least for now it works.

Besides using that code to download files, the simple native webpopup can also be used if you need to communicate datas with a server in background.
I’m developing an app that need to send gps coordinates to a server and get some datas. Before I used the native lua http functions (not async), but every time a network connection occurs the app freezes for a few seconds. Not very professional.
So I used a hidden native webpopup to start a connection to the server, and a html redirect to automatically send the data back to corona through a link (intercepted by the webpopup listener).

It works pretty well and it’s async.

The only problem, so far, is that you can’t start any new native webpopup while the webpopup used to communicate to the server is receiving or sending data to the app… [import]uid: 9158 topic_id: 1172 reply_id: 10244[/import]

+1 for a native one. [import]uid: 10917 topic_id: 1172 reply_id: 11049[/import]