Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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("http://www.contoso.com/");
WebResponse resp = req.GetResponse();

This example requires:

  • References to the System.Net namespace.

Community Additions

ADD
Show:
© 2015 Microsoft