top | item 6188159

(no title)

neonlex | 12 years ago

I also strongly disagree. The real problem is that browsers can't use them as good as they should. If you take for example a RESTful API, the verbs make totally sense and especially one of the mentioned verbs. PATCH is a great verbs if you use it like it was specified. I personally like the idea of giving more freedom to chose the verbs. Imagine you could use for a Twitter API something like: FOLLOW /users/123

discuss

order

pbreit|12 years ago

> The real problem is that browsers can't use them as good as they should

That's the obvious inevitability of having too many superfluous options. And one of the main thrusts of the article.

icebraining|12 years ago

Yes, but people disagree on the "superfluous" part.

fleitz|12 years ago

Yes, it would be horrible if you instead had to do: POST /user/123/follow

jasonkostempski|12 years ago

PUT /myuser/following/theiruser

seliopou|12 years ago

Yeah, if that's where your URL ended. But what if your URLs kept going? Say you had

    /user/123/followers
or

    /user/123/followers/followers
or

    /user/123/followers/followers/following
? When your URLs have a non-obvious terminus (as is typical of proper REST APIs) it becomes clear that the verb does not belong in the URL path.

seliopou|12 years ago

The HTTP specification in no way restricts the verbs that you can use to those that are in common use. But at some point somebody, somewhere, decided that the only ones allowed were the ones that the specification explicitly mentioned. And so people just shoehorn their applications into frameworks built around what the HTTP specification defines, rather than allows.

Ain't nobody got time for defining semantics.

smsm42|12 years ago

Javascript can use them just fine. Browsers without JS can't do a lot of useful things, that's why JS exists.