This sample illustrates using the WebRequest and WebResponse classes to make a GET request on a URI with SSL.
</P>
<P>
There is no actual code difference between this example, and the clientGET.cs example. The point is: you can enter a URL with a http<B>s</B>:// instead of http:// and the WebRequest will work exactly the same!
</P>
<P>
The function getPage is where the specific details of making the request can be found. The rest of the code in this sample is for taking command-line parameters, and displaying help usage for the parameters as well. This sample program is a command-line utility that runs at the command prompt.
</P>
<P>
The <B>getPage</B> function takes a string parameter, which is the URL (or URI) of the web page to request. This URI is then included as a parameter in a call to <B>WebRequestFactory.Create</B> which creates a <B>WebRequest</B> object.
</P>
<P>
The <B>GetResponse</B> function of the WebRequest object is then used to get a <B>WebResponse</B> object. This object can be used to get the status code of the response, as well as the actual response stream, for instance a web page.
</p>
<P>
Actually writing out the stream can take several different forms. This example reads a byte array (of 512 bytes) into the Byte[] variable <B>read</B> with the <B>Read</B> function. It then writes out the 512 bytes with a Console.WriteLine function: Console.Write(System.Text.Encoding.ASCII.GetString(read, 0, bytes));