A System.Net.WebResponse containing the response to the Internet request.
Type Reason NotSupportedException This method is not overridden in the derived class. System.Net.WebException The request timed out.
-or-
An error occurred while processing the request.
The WebRequest.GetResponse method sends a request to an Internet resource and returns a System.Net.WebResponse instance. If the request has already been initiated by a call to WebRequest.GetRequestStream, the WebRequest.GetResponse method completes the request and returns any response.
The WebRequest.GetResponse method provides synchronous access to the System.Net.WebResponse. For asynchronous access, use the WebRequest.BeginGetResponse(AsyncCallback, object) and WebRequest.EndGetResponse(IAsyncResult) methods.
The System.Net.WebRequest class is an abstract class. The actual behavior of System.Net.WebRequest instances at run time is determined by the descendant class returned by the WebRequest.Create(Uri) method. For more information about default values and exceptions, see the documentation for the descendant classes, such as System.Net.HttpWebRequest and System.Net.FileWebRequest.
If a WebException is thrown, use the WebException.Response and WebException.Status properties of the exception to determine the response from the server.