Download source code

static void Main(string[] args) {
    if (args.Length < 1) {
        Console.WriteLine("Please enter URL");
        Console.WriteLine("Usage: HttpClientConsole.exe <URL>");
        return;
    }
 
    using (Http http = new Http()) {
        string[] result = http.Get(args[0]);
 
        foreach (string s in result) {
            Console.WriteLine(s);
        }
    }
}

Article ID: 60, Created On: 7/15/2013, Modified: 7/15/2013