HttpMethod Property

HttpRequest.HttpMethod Property

Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client.

[Visual Basic]
Public ReadOnly Property HttpMethod As String
public string HttpMethod {get;}
public: __property String* get_HttpMethod();
public function get HttpMethod() : String;

Property Value

The HTTP data transfer method used by the client.


The following example assigns a value representing the HttpMethod of the HTTP request to a string variable.

[Visual Basic] 
Dim str As String
 str = Request.HttpMethod

String str;
 str = Request.HttpMethod;

String* str;
 str = Request->HttpMethod;

var str : String = Request.HttpMethod


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

© 2015 Microsoft