Right now, all Network functions are blocking. Calling downloadFile makes the application looks like it stopped responding and there is no way to indicate that the System is still doing something to the user.
I suggest adding a callback function to Network.downloadFile and maybe Network.requestString too (although requestString usually doesn't block as long as big file downloads) that gets called so developers can use that to show a progress bar for example, or simply allow for some kind of animated indicator that the download is still going.
If possible, adding the currently downloaded size and the full size of the file in question as arguments of the callback.
Example:
Right now, all Network functions are blocking. Calling downloadFile makes the application looks like it stopped responding and there is no way to indicate that the System is still doing something to the user. I suggest adding a callback function to Network.downloadFile and maybe Network.requestString too (although requestString usually doesn't block as long as big file downloads) that gets called so developers can use that to show a progress bar for example, or simply allow for some kind of animated indicator that the download is still going.
If possible, adding the currently downloaded size and the full size of the file in question as arguments of the callback. Example: