HttpRequest.HttpMethod 속성

정의

클라이언트에서 사용하는 HTTP 데이터 전송 메서드(예: GET, POST 또는 HEAD)를 가져옵니다.

public:
 property System::String ^ HttpMethod { System::String ^ get(); };
public string HttpMethod { get; }
member this.HttpMethod : string
Public ReadOnly Property HttpMethod As String

속성 값

String

클라이언트에서 사용하는 HTTP 데이터 전송 메서드입니다.

예제

다음 코드 예제에서는 메서드를 HtmlEncode 사용하여 속성 값 HttpMethodWriteLine 메서드를 HTML로 인코딩하여 인코딩된 값을 파일에 씁니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 HttpRequest 클래스입니다.

// Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.RequestType));
sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress));
sw.WriteLine(Server.HtmlEncode(Request.UserHostName));
sw.WriteLine(Server.HtmlEncode(Request.HttpMethod));
' Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.RequestType))
sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress))
sw.WriteLine(Server.HtmlEncode(Request.UserHostName))
sw.WriteLine(Server.HtmlEncode(Request.HttpMethod))

다음 예제에서는 이 코드에 의해 생성되는 출력을 보여줍니다.

GET

127.0.0.1

127.0.0.1

GET

적용 대상