@Blog.Author(Nandip Makwana) .LearningExperience(ASP.NET, ASP.NET MVC, IIS, jQuery & Technology Surrounding it...)

October 29, 2012 comment

ASP.NET MVC: HttpPatch action filter

ASP.NET MVC: HttpPatch

HttpPatch action filter attribute confirm that specified method should be available only via HTTP PATCH request. HttpPatch action filter is new in MVC 4. HTTP PATCH verb is relatively new and it is used to modify an existing HTTP resource. HTTP PUT allow us to create or replace existing HTTP resource but we cant modify existing resource with HTTP PUT. This is where HTTP PATCH comes in picture.

Attribute Usage: Only method

Sample Code:

public ActionResult About()
    return View();

Alike other action filter, We can’t access such method with other than HTTP PATCH verb. If we try to access it with other HTTP verb then it will fail and return HTTP 404 not found error.

Check out ASP.NET MVC: Action filter series post to read about other available action filters.

You can follow me on twitter for latest link and update on ASP.NET & MVC.

comments powered by Disqus

Featured Content

Resources & Tools

About Nandip Makwana

Nandip Makwana is passionate about digital world and web. He completed his Masters in Computer Application in June 2011. Currently he is working as a Software Engineer. He has shown great promise and command over ASP.NET and technologies surrounding it during his academic years and professorial life...continue reading