1 //
2 // This test program uses the Http client to fetch the contents
3 // of a request.  As opposed to the rtest program, this one is
4 // used merely to compare the contents, not look at the traffic
5 // produced.
6 //
7 using System;
8 using System.IO;
9 using System.Net;
10 using System.Web;
11 
12 class X {
13 
Main(string [] args)14 	static void Main (string [] args)
15 	{
16 		string url = String.Format ("http://{0}:{1}/{2}", args [0], args [1], args [2]);
17 
18 		HttpWebRequest web = (HttpWebRequest) WebRequest.Create (url);
19 
20 		Stream s = web.GetResponse ().GetResponseStream ();
21 
22 		StreamReader sr = new StreamReader (s);
23 		Console.WriteLine (sr.ReadToEnd ());
24 	}
25 }
26