HttpRequest.RequestType Özellik

Tanım

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

public:
 property System::String ^ RequestType { System::String ^ get(); void set(System::String ^ value); };
public string RequestType { get; set; }
member this.RequestType : string with get, set
Public Property RequestType As String

Özellik Değeri

String

İstemci tarafından gönderilen HTTP çağırma türünü temsil eden bir dize.

Örnekler

Aşağıdaki kod örneği, özelliğinin HtmlEncode değerini RequestType 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))

Şunlara uygulanır