Share via


HttpRequestHeaderCollection.From 속성

정의

HTTP 요청의 From HTTP 헤더 값을 나타내는 String을 가져오거나 설정합니다.

public:
 property Platform::String ^ From { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring From();

void From(winrt::hstring value);
public string From { get; set; }
var string = httpRequestHeaderCollection.from;
httpRequestHeaderCollection.from = string;
Public Property From As String

속성 값

String

Platform::String

winrt::hstring

HTTP 요청의 From HTTP 헤더 값입니다. 빈 문자열은 헤더가 없음을 의미합니다.

설명

다음 샘플 코드에서는 HttpRequestHeaderCollection 개체의 From 속성을 사용하여 HttpRequestMessage 개체에서 From 헤더를 설정하는 메서드를 보여 줍니다.

public void DemonstrateHeaderRequestFrom() {
    var request = new HttpRequestMessage();

    // Set the header with a string.
    request.Headers.From = "person@example.com";

    // Get the strong type out
    System.Diagnostics.Debug.WriteLine("From value: {0}", request.Headers.From);
}

적용 대상

추가 정보