Re: server applying PUT to a resource other than the request-URI

On mån, 2008-10-20 at 22:12 +0200, Julian Reschke wrote:
> Henrik Nordstrom wrote:
> > Sorry. A bit tired. Didn't notice the change to POST.
> > 
> > Switching to POST isn't good either.
> > 
> > I'll second Brians response here.
> 
> Which part?

The whole message with 3 alternatives, all three of them.

> > Additionally allowing for PUT to create a new resoure-URI completely
> > different from the request-URI would make sense, but needs to be
> > negotiated by a request header indicating that the client accepts this.
> 
> Well, I proposed a new method for this in 2005, and the answer to that 
> was: just use POST. And that is what AtomPub has done.
> 
> So is this suddenly the wrong advice?

It's a matter of semantics. POST is meant for application transfers, for
data being processed by the server, with no direct content mapping to
the created resource (if any). PUT is a request to store an entity
"as-is".

However, creating a new method for this is defenitely not the right
thing. Better to extend PUT to allow this use case by conditionally
relaxing the target resource URI requirements, or use POST.

Regards
Henrik

Received on Monday, 20 October 2008 20:22:29 UTC