Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This example shows how to retrieve a protocol-specific WebResponse that matches a WebRequest.
Example
WebRequest req = WebRequest.Create("https://www.contoso.com/");
WebResponse resp = req.GetResponse();
Dim req As WebRequest = WebRequest.Create("https://www.contoso.com")
Dim resp As WebResponse = req.GetResponse()
Compiling the Code
This example requires:
- References to the System.Net namespace.