HttpRequest.HttpMethod Özellik

Tanım

İstemci tarafından kullanılan HTTP veri aktarım yöntemini (, veya HEADgibiGETPOST) alır.

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

Özellik Değeri

İstemci tarafından kullanılan HTTP veri aktarım yöntemi.

Örnekler

Aşağıdaki kod örneği, özelliğin HtmlEncode değerini HttpMethod HTML ile kodlamak için yöntemini ve WriteLine kodlanmış değeri dosyaya yazmak için yöntemini kullanır. Bu kod örneği, sınıfı için HttpRequest sağlanan daha büyük bir örneğin parçasıdır.

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

Aşağıdaki örnek, bu kod tarafından oluşturulan çıkışı gösterir.

GET

127.0.0.1

127.0.0.1

GET

Şunlara uygulanır