Task

Access and print a URL's content (the located resource) to the console.

There is a separate task for HTTPS Requests.




      SYS "LoadLibrary", "URLMON.DLL" TO urlmon%
      SYS "GetProcAddress", urlmon%, "URLDownloadToFileA" TO URLDownloadToFile
 
      url$ = "http://www.bbcbasic.co.uk/aboutus.html"
      file$ = @tmp$ + "rosetta.tmp"
      SYS URLDownloadToFile, 0, url$, file$, 0, 0 TO fail%
      IF fail% ERROR 100, "File download failed"
 
      OSCLI "TYPE """ + file$ + """"