Task

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

There is a separate task for HTTPS Requests.




 
declare
  fun {GetPage Url}
     F = {New Open.file init(url:Url)}
     Contents = {F read(list:$ size:all)}
  in
     {F close}
     Contents
  end
in
  {System.showInfo {GetPage "http://www.rosettacode.org"}}
 