Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

Most of them are still used, though not as widely as GET or POST. For example RESTful web services use PUT & DELETE as well as GET & POST:

RESTful Web Service - Wiki Article

HEAD is very useful for server debugging of the HTTP headers, but as it doesn't return the response body, it's not much use to the browser / average web visitor...

Other verbs like TRACE aren't as widespread, because of potential security concerns etc. Mentioned briefly in the Wiki article:

HTTP Protocol Methods - Wiki Article

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top