On Jun 4, 2007, at 10:30 AM, Edi Weitz wrote:

On Mon, 4 Jun 2007 09:48:19 -0400, Jonathon McKitrick <jmckitrick@reedlarkeygroup.com> wrote:

I'm using REST as well, so maybe I can offer some thoughts on this.
POST is used when sending data to a URL endpoint, and often it means
an entity is created, like an SQL INSERT.  PUT is used to update
some properties of an already existing entity, like an SQL UPDATE.
At least that's the most common use.  So with a POST reply I create
an entity and return the URL in the 'location' header of the
response.  A PUT request applies the parameters to the entity
identified by the URL.

Strange.  To me that seems counterintuitive and not really in sync
with how PUT is described[1] in RFC 2616.  But, anyway, if you REST
guys think you need this, send a reasonable patch[2] and I'll review
it.


I've been testing some code to PUT an XML entity rather than populating the POST parameters, but I'm not sure how to get the content from the request via hunchentoot.  I've found GET-CONTENT in CL-WEBDAV, but that code seems to read the raw content data as a file, while I'm sending data as an XML document.  Is there a simple way to do this without resorting to another library?

--
Jonathon McKitrick
jmckitrick@reedlarkeygroup.com