This documentation is archived and is not being maintained.

How to: Retrieve a Protocol-Specific WebResponse that Matches a WebRequest 

This example shows how to retrieve a protocol-specific WebResponse that matches a WebRequest.


WebRequest req = WebRequest.Create("");
WebResponse resp = req.GetResponse();

Compiling the Code

This example requires:

  • References to the System.Net namespace.

See Also