Online

To make a simple data request you can use these functions below. For more elaborate functionality please use 'curl'

examples

// open a URL and print the raw page data to console
function TestReadUrl()
{
    echo(openUrl("https://beatrig.com/", "")); // prints the source of the beatrig homepage
}

// download a file from a URL
function TestDownloadFile()
{
    var url = "https://beatrig.com/beatrig/files/logos/logo-white.svg";
    var target_filepath = folders.temp + gvar.pss + "beatrig-logo-white.svg";
        
    setProgress(101);
    var size = downloadFile(target_filepath, url); // asks for confirmation
    echo("file size: " + size + " bytes");
}