3 ms·
There are all of nine HTTP methods, using them correctly should not be that difficult. edit: Well, ajross has a point. There are actually all of eight HTTP 1.
by tvon 14y ago
There are all of nine HTTP methods, using them correctly should not be that difficult.
edit: Well, ajross has a point. There are actually all of eight HTTP 1.1 methods, and PATCH is not one of them.
- ajross 14y agoThe cargo-cult fallacy that there is a "correct" way to do something as complicated and varied as web service provision is exactly the kind of nonsense I'm talking about. It is "easy" to blindly follow any rule. In most cases it is also wrong.
- tvon 14y agoI'm talking about the correct way to use a HTTP method as defined by the HTTP specification. > It is "easy" to blindly follow any rule. In most cases it is also wrong. Come on.
- ajross 14y agoThen you are speaking from ignorance. PATCH is not part of the HTTP specification. It's defined in an IETF RFC (5789) upon which the ink is not yet dry (March 2010, and in fact it's not even stable: the most recent errata was 31 days ago). Feeling entitled to making firm pronouncements about "correct" behavior on subjects one is not an expert in (and let's be clear: no one is an expert on PATCH yet) is in some sense the very definition of "cargo cult mentality". Edit: that's probably harsher than it's intended. My point isn't really about PATCH, which seems sane. It's about the pedantic mentality which is running rampant in the REST community (c.f. the "ARGH!" above), which in my mind is taking a good idea and polluting it with terrible nonsense in the pursuit of "purity". Think of what happened to Agile if you continue down this path.
- superasn 14y agoAlso how do you make a PUT or PATCH request from programming languages like Actionscript (and quite possibly Javascript though I'm not sure) which only support POST and GET requests currently?
- grabastic 14y agoMany frameworks overload the POST operation and allow the desired verb to be specified in the data. Rack::MethodOverride does this for Rack-based apps by using the value of the _method parameter as the http verb.
- alexchamberlain 14y agoFYI Javascript supports PUT. I suppose firewalls could be a problem...
- pfraze 14y agoThere is a good reason to adhere to common usage for the common verbs, though: you can meet expectations better. We generally know what to expect out of GET because it's used consistently.