Returns the HTTP method for the current request.
This method takes no parameters.
A pointer to a string that contains the HTTP method for the request.
The GetHttpMethod method retrieves the HTTP method for the current request. For most Internet traffic, the HTTP method will typically be a GET or POST method. Retrieving the HTTP method in your application enables you to process a request differently depending on the type of request method. For example, you may want your application to process only GET requests.
Standard HTTP methods are defined in Request for Comments (RFC) 1945, "Hypertext Transfer Protocol -- HTTP/1.0," or RFC 2616, "Hypertext Transfer Protocol -- HTTP/1.1".
The following code example demonstrates how to use the GetHttpMethod method to create an HTTP module that retrieves the HTTP method for the current request. The example then displays the method to a Web client.