I explained in more detail here: http://stackoverflow.com/questions/2191049/what-is-the-advan...
I explained in more detail here: http://stackoverflow.com/questions/2191049/what-is-the-advan...
That breaks the basic, clean, clear model of HTTP:
URI: specifies the resource against which an action
is to be performed
Method: specifies the action to perform against the
resource
In favor of a muddy model of: URI: specifies a combination of the resource against
which an action is to be performed, and some
information about the action that is to be performed
against the resource
Method: specifies incomplete information about the
action to be performed.
Why on Earth would you want to do that?> This also has the advantage that you aren't artificially restricting yourself to CRUD operations.
I'm try to think of an operation in a system that can't be fairly clearly represented with the semantics of HTTP/1.1 verbs + PATCH, and failing.
> Some operations do not map to those, e.g. logging out (DELETE user? ... No... DELETE session? I guess?).
DELETE session is pretty natural. PATCH session to change the status to closed or, if the session status is its own resource, PUT closed to the status, are also options.
I prefer to view HTTP method selection based on the logic from the "user side" rather than the implementation from the "system side".
Obviously, though, there are different ways of looking at this, and no One True Way.
You mean reasons like browsers not supporting anything but POST and GET?
POST /_session GET /_session DELETE /_session
(CouchDB API)
Its the way I would go about logging somebody out. Why wouldn't you?
(And GET/POST/PUT/DELETE isn't CRUD.)