Task

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

There is a separate task for HTTPS Requests.




import scala.io.Source
 
object HttpTest extends App {
  System.setProperty("http.agent", "*")
 
  Source.fromURL("http://www.rosettacode.org").getLines.foreach(println)
}