Task

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

There is a separate task for HTTPS Requests.




/* NetRexx */
options replace format comments java crossref symbols binary
 
import java.util.Scanner
import java.net.URL
 
do
  rosettaUrl = "http://www.rosettacode.org"
  sc = Scanner(URL(rosettaUrl).openStream)
  loop while sc.hasNext
    say sc.nextLine
  end
catch ex = Exception
  ex.printStackTrace
end
 
return