Http Request via External Server

Hi guys,

I’m looking to use data from a CSV file on my server is this possible to pull data from this document via Corona. So basically the app would be presented with a link which would be to my CSV document, and from that I could display the relevant information in the app from the document? Is this possible or am I just going to have to do this via a different method entirely?

Thanks,

Matt.

You can use network.download() to fetch the CSV file and store it in a local directory your app has access to (system.CachesDirectory or system.TemporaryDirectory). Then you can open the file, read the data in. You will have to write a parser for CSV (or find something similar on the Internet… I’m sure someone has done a Lua CSV parser). The results will likely be a Lua table that you can then manipulate.

Rob

You can use network.download() to fetch the CSV file and store it in a local directory your app has access to (system.CachesDirectory or system.TemporaryDirectory). Then you can open the file, read the data in. You will have to write a parser for CSV (or find something similar on the Internet… I’m sure someone has done a Lua CSV parser). The results will likely be a Lua table that you can then manipulate.

Rob