Search code examples
c#asp.nethttphttpcontexthttp-verbs

Http verb of current http context


How do you find the http verb (POST,GET,DELETE,PUT) used to access your application? Im looking httpcontext.current but there dosent seem to be any property that gives me the info. Thanks


Solution

  • Use HttpContext.Current.Request.HttpMethod.

    See: http://msdn.microsoft.com/en-us/library/system.web.httprequest.httpmethod.aspx