Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why aren't the rest of the HTTP verbs used?

Most of the times, websites mainly only use GET and POST for all operations, yet there are seven more verbs out there. Where they used in older times but not so much now?

Or maybe is it because some browsers don't recognize the other verbs? And if that's the case, why do browser vendors choose to implement half of the protocol?

[Update]

I found this article which gives a good summary about the situation: Why REST failed.

like image 812
Andreas Grech Avatar asked May 03 '11 11:05

Andreas Grech


1 Answers

The HTML spec is a big culprit, only really allowing GET, POST and HEAD. They are getting used quite a bit though, but not as much directly in browsers.

The most common uses of the other crud-verbs such as PUT and DELETE are in REST services and WebDAV.

You'll see OPTIONS more in the future, as it's used by the CORS specification (cross domain xmlhttprequest).

TRACE is pretty much disabled everywhere, as it poses a pretty big security risk. CONNECT is definitely used quite a bit by proxies.

PATCH is brand new. While it's odd to me that they decided to add it to the list (but not PROPFIND, MKCOL, ACL, LOCK, and so on), I do think we'll see it appear more in the future in RESTful services.

Addendum: The original browser used both GET and PUT (the latter for updating web pages). Later browsers pretty much became read-only until forms and the POST request made their way into the specifications.

like image 187
Evert Avatar answered Sep 21 '22 10:09

Evert