June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to retrieve a file from the Web.
Use the HttpWebRequest class to create your request, the WebResponse class to retrieve the response from the Web server, and some form of reader (typically a StreamReader for HTML or text data or a BinaryReader for a binary file) to parse the response data.
Downloading a file from the Web takes the following four basic steps:
Use the shared Create method of the System.Net.WebRequest class to specify the page you want. This method returns a WebRequest derived object, depending on the type of Uniform Resource Identifier (URI) you use. For example, if you use an HTTP URI (with the scheme http://), it will create an HttpWebRequest instance. If you use a file ...
Read now
Unlock full access