Reputation: 1018
For exception handling purposes I would like to know if an ajax request was made with POST or GET, but can't find out how to do it.
I got this far:
var request = filterContext.RequestContext.HttpContext.Request.GetType();
Am I on the right track at all?
Upvotes: 1
Views: 1251
Reputation: 1038730
filterContext.RequestContext.HttpContext.Request.HttpMethod
Upvotes: 3
Reputation: 33476
Take a look at RequestType
property to determine whether it was a GET or a POST.
Upvotes: 5