Re: [ISSUE-32] Implications of updates on protocol, regarding HTTP methods

On Wed, 2009-07-29 at 20:31 +0100, Steve Harris wrote:
> There is a subtlety here that's not been accounted for, PUT/DELETE and  
> POST/GET are not operations at the same level. PUT and DELETE have  
> fairly specific semantics whereas GET (with CGI arguments) and POST  
> are transports for operations with their own semantics.

Steve, I'm not sure I understand how you mean GET to be a transport for
operations with their own semantics? The operation is "retrieve the
content of" and the object is identified by the URI. Yes, the URI may
identify a view on another resource (e.g. a query), but the operation
remains.

POST, depending on who you ask, is either completely open (do what you
wish, even GET/PUT/DELETE if you don't mind the intermediaries won't
know what you're doing), or an addition of data to a resource. Only some
uses of POST can truly be seen as transports for operations with their
own semantics - when a single URI does different things upon receiving
different bodies.

> Specifically, it is not normal to attach arguments to PUT or DELETE  
> requests - the URI given after the verb, plus the headers are supposed  
> to contain all the information. Eg. a DELETE to http://example.com/foo  
> has a fairly specific meaning, whereas a POST to http://example.com/ 
> foo has no specific meaning on it's own.

PUT is supposed to have a body, which will replace the contents of the
resource identified by the request URI. DELETE does not have a body.

Best regards,
Jacek

Received on Wednesday, 29 July 2009 20:12:52 UTC