Search code examples
bada

How to read a remote file into a string in BADA


I am an iOS developer migrating to BADA. In iOS we had a simple method to load the contents of a text file from a server and use it as a string in our app. How do I do the same in BADA?

Something like this

NSData *dtXmlData = [NSData dataWithContentsOfURL:url];

Solution

  • You should probably send an http GET request and read the buffer received in OnTransactionReadyToRead();