Condividi tramite


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.

Esempio

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()

Compilazione del codice

This example requires:

  • References to the System.Net namespace.

Vedere anche

Concetti

Requesting Data