X-HTTP-Method-Override

While not normally an issue with thick clients, accessing full RESTful capabilities of available services via browsers often is problematic as many (if not all) browsers only allow a form to GET or POST. They don't allow for other HTTP methods, like HEAD, PUT, or DELETE. Google realized this and offers a solution, which is to add a header to the HTTP request, X-HTTP-Method-Override, that is supposed to be interpreted by the service and acted upon regardless of the actual HTTP method used.

The header syntax is as follows:

X-HTTP-Method-Override: PUT

You can learn more about it from http://code.google.com/apis/gdata/docs/2.0/basics.html#UpdatingEntry.

As it happens, ASP.NET MVC, version 2, supports this out of the box with the HttpHelper.HttpMethodOverride method. Just use that helper method in your view, and assuming the service honors the header, your Web page should be able to work with the RESTful service. I thought this blog entry was particularly interesting (he has an interest in using ASP.NET MVC for RESTful services as well).


Tags:
Categories: RESTful Services

9 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Comments

April 19. 2010 05:27

Belva Eckblad

Dude.. I'm not a great deal into reading about rest , but somehow I got to read plenty of posts on your weblog. Its wonderful how interesting it is for me to visit you very often.

Belva Eckblad

April 20. 2010 18:38

Janiece Cogdell

rest rest rest I totally accept as true with the above note, the internet is having a doubt growing into an important medium of communication across the world and its due to web-sites like this that ideas are spreading so quickly

Janiece Cogdell

April 20. 2010 20:24

Loise Hershberg

Positive site, where did u invent some the information with this posting? I am happy I found it though, ill be checking back soon to find out what added content pieces u include.

Loise Hershberg

June 30. 2012 05:42

pingback

Pingback from entertainmentweeklymagazine.wfiedler-free-templates.org

Philadelphia Restaurant Review: No-brow Americana at Square … | Entertainment Weekly Magazine

entertainmentweeklymagazine.wfiedler-free-templates.org

July 31. 2012 19:16

pingback

Pingback from icoding.ap01.aws.af.cm

幫你的網頁加上 backbone(.js) 吧(五)!  |  iCoding

icoding.ap01.aws.af.cm

December 23. 2012 18:50

pingback

Pingback from nodehispano.com

Guia express & mongoose para Node.js – Parte II #nodejs | Node.js Hispano

nodehispano.com

December 17. 2016 21:37

pingback

Pingback from steroidsforsale.biz

buy quality dianabol

steroidsforsale.biz

December 19. 2016 23:08

pingback

Pingback from steroidsforsale.biz

anabolic steroids for sale

steroidsforsale.biz

March 14. 2017 10:58

pingback

Pingback from roids.online

best place to buy anavar

roids.online

Add comment




  Country flag

Click to change captcha
biuquote
  • Comment
  • Preview
Loading