Task

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

There is a separate task for HTTPS Requests.




using System;
using System.Console;
using System.Net;
using System.IO;
 
module HTTP
{
    Main() : void
    {
        def wc = WebClient();
        def myStream = wc.OpenRead("http://rosettacode.org");
        def sr = StreamReader(myStream);
 
        WriteLine(sr.ReadToEnd());
        myStream.Close()
    }
}