RE: REST and the Web

> -----Original Message-----
> From: Joshua Allen [mailto:joshuaa@microsoft.com] 

> There *is* a "proper" way to use POST: in my opinion that is 
> the behavior which says that the POSTed entity creates a new 
> URI which is subordinate to the POST target, and returns the 
> URI of that new resource.  This is really a fine 
> architecture, and if people stuck to it we would have a much 
> easier time in realizing the semantic web.

There isn't a requirement in the specification that a new resource with a
URI be created.
If it happens that a new resource is created, the protocol describes how to
say that (201 Created and Location:), but it is optional behavior.

--rfc2068--
9.5 POST

   The POST method is used to request that the destination server accept
   the entity enclosed in the request as a new subordinate of the
   resource identified by the Request-URI in the Request-Line. 
   [...]
   The action performed by the POST method might not result in a
   resource that can be identified by a URI. In this case, either 200
   (OK) or 204 (No Content) is the appropriate response status,
   depending on whether or not the response includes an entity that
   describes the result.

   If a resource has been created on the origin server, the response
   SHOULD be 201 (Created) and contain an entity which describes the
   status of the request and refers to the new resource, and a Location
   header (see section 14.30).

Received on Monday, 1 April 2002 12:41:22 UTC