Task

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

There is a separate task for HTTPS Requests.




use HTTP;
use Collection;
 
class HttpTest {
  function : Main(args : String[]) ~ Nil {
    lines := HttpClient->New()->Get("http://rosettacode.org");
    each(i : lines) {
      lines->Get(i)->As(String)->PrintLine();
    };
  }
}