Condividi tramite


HttpRequest.RequestType Proprietà

Definizione

Ottiene o imposta il metodo di trasferimento dati HTTP (GET o POST) utilizzato dal client.

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

Valore della proprietà

Stringa che rappresenta il tipo di chiamata HTTP inviato dal client.

Esempio

Nell'esempio di codice seguente viene utilizzato il HtmlEncode metodo per codificare html il valore della RequestType proprietà e il WriteLine metodo per scrivere il valore codificato nel file. Questo esempio di codice fa parte di un esempio più ampio fornito per la HttpRequest classe .

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

Si applica a