Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

Example

WebRequest req = WebRequest.Create("http://www.contoso.com/");
WebResponse resp = req.GetResponse();

Compiling the Code

This example requires:

  • References to the System.Net namespace.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.