Nyelv

HttpRequest.RequestType Tulajdonság

Definíció

Lekéri vagy beállítja az ügyfél által használt HTTP-adatátviteli módszert (GET vagy POST) .

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

Tulajdonság értéke

Az ügyfél által küldött HTTP-hívástípust képviselő sztring.

Példák

Az alábbi példakód a metódust használja a HtmlEncode tulajdonság értékének RequestType HTML-kódolására, a WriteLine metódus pedig a kódolt érték fájlba írására. Ez a példakód egy nagyobb, az HttpRequest osztályhoz tartozó példa része.

// 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 következőre érvényes: