Provides an HTTP-specific implementation of the System.Net.WebResponse class.
See Also: HttpWebResponse Members
This class contains support for HTTP-specific uses of the properties and methods of the System.Net.WebResponse class. The System.Net.HttpWebResponse class is used to build HTTP stand-alone client applications that send HTTP requests and receive HTTP responses.
Do not confuse System.Net.HttpWebResponse with the System.Web.HttpResponse class that is used in ASP.NET applications and whose methods and properties are exposed through ASP.NET's intrinsic Response object.
You should never directly create an instance of the System.Net.HttpWebResponse class. Instead, use the instance returned by a call to HttpWebRequest.GetResponse. You must call either the System.IO.Stream.Close or the HttpWebResponse.Close method to close the response and release the connection for reuse. It is not necessary to call both System.IO.Stream.Close and HttpWebResponse.Close, but doing so does not cause an error.
Common header information returned from the Internet resource is exposed as properties of the class. See the following table for a complete list. Other headers can be read from the HttpWebResponse.Headers property as name/value pairs.
The following table shows the common HTTP headers that are available through properties of the System.Net.HttpWebResponse class.