다음을 통해 공유


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("https://www.contoso.com/");
WebResponse resp = req.GetResponse();
Dim req As WebRequest = WebRequest.Create("https://www.contoso.com")
Dim resp As WebResponse = req.GetResponse()

코드 컴파일

This example requires:

  • References to the System.Net namespace.

참고 항목

개념

Requesting Data