I was wondering how to acshuly use nvgt CURL? It isn't documented that mutch. Trying to download files using it but not sure how to do so.
Hmmm, I don't know where you are looking at, but i see it fully documented. See this example (taken from the Discord demo channel I think) though. Note that some things are commented out which is not the case in the orginal code:
string dl_file(string url, string disk_file,bool quiet=false,string msg="Downloading. Press Space for percentage, 1 2 and 3 keys for detailed progress, or escape to cancel")
{
internet_request r(url,disk_file);
if(!quiet) speak(msg);
string status;
while(r.complete!=true)
{
wait(5);
if (key_pressed(KEY_ESCAPE))
{
status="canceled";
speak(status);
wait(600);
return status;
}
else if (key_pressed(KEY_1))
{
string size=round(r.download_size/1024/1024, 2)+" MB ("+round(r.download_size/1024, 2)+" KB)";
speak("File size: "+size);
}
else if (key_pressed(KEY_2))
{
string size=round(r.bytes_downloaded/1024/1024, 2)+" MB ("+round(r.bytes_downloaded/1024, 2)+" KB)";
speak("Total downloaded: "+size);
}
else if (key_pressed(KEY_3))
{
string size=(round(r.download_size/1024/1024, 2)-round(r.bytes_downloaded/1024/1024, 2))+" MB( "+(round(r.download_size/1024, 2)-round(r.bytes_downloaded/1024, 2))+" KB)";
speak("Total remaining: "+size);
}
else if (key_pressed(KEY_SPACE))
{
speak(round(r.download_percent,0)+" percent");
}
else if(r.complete==true)
{
status="finished";
}
//prog.play();
}
return status;
}