How to: Request a Web Page and Retrieve the Results as a Stream
The document is archived and information here might be outdated

How to: Request a Web Page and Retrieve the Results as a Stream

This example shows how to request a Web page and retrieve the results in a stream.

WebClient myClient = new WebClient();
Stream response = myClient.OpenRead("http://www.contoso.com/index.htm");
// The stream data is used here.
response.Close();

This example requires:

Show:
© 2016 Microsoft