Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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
[C#]
public string HttpMethod {get;}
[C++]
public: __property String* get_HttpMethod();
[JScript]
public function get HttpMethod() : String;

Property Value

The HTTP data transfer method used by the client.

Example

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


[C#] 
String str;
 str = Request.HttpMethod;


[C++] 
String* str;
 str = Request->HttpMethod;


[JScript] 
var str : String = Request.HttpMethod

Requirements

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

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

Show:
© 2015 Microsoft