Task

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

There is a separate task for HTTPS Requests.




import http
import url
 
url     = new(URL, "http://rosettacode.org/wiki/Rosetta_Code")
client  = new(HTTPClient, url.getHost())
client.connect()
 
response = client.get(url.getFile())
println response.get("body")