HttpWebRequest.Address 속성

정의

요청에 실제로 응답하는 인터넷 리소스의 URI(Uniform Resource Identifier)를 가져옵니다.

public:
 property Uri ^ Address { Uri ^ get(); };
public Uri Address { get; }
member this.Address : Uri
Public ReadOnly Property Address As Uri

속성 값

Uri

요청에 실제로 응답하는 인터넷 리소스를 식별하는 Uri입니다. 기본값은 요청을 초기화하기 위해 Create(String) 메서드가 사용한 URI입니다.

예제

The following code example checks to see if the HttpWebRequest object req was redirected to another location to fulfill the request, and sets the value of the hasChanged variable to true if the request was redirected; otherwise hasChanged is set to false.

bool hasChanged = req->RequestUri->Equals( req->Address );
bool hasChanged = (req.RequestUri != req.Address);
Dim hasChanged As Boolean = _
   (req.RequestUri.ToString() <> req.Address.ToString())

설명

Address 요청 중에 발생하는 리디렉션이 완료되면 속성이 URI로 설정됩니다.

원래 요청의 URI는 속성에 RequestUri 유지됩니다.

적용 대상