I have methods like this:
[HttpPost]
public ActionResult Delete(BaseViewModel vm) {
public ActionResult Delete(string ac) {
try {
From within my action filter is there a way that I can check if the method is a post or get ?
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
??
The
ActionExecutingContexthas aHttpContextproperty. From there, you can obtain theRequestproperty, which has aHttpMethodproperty, which tells you which method was used in this request.