Bertrand Delacretaz wrote:
On Thu, Oct 16, 2008 at 5:14 PM, David Nuescheler <[EMAIL PROTECTED]> wrote:
...anyway, in hind-sight the /xyz/* for the POST is probably not ideal
and in my mind should
be deprecated in favour of /xyz/ with a trailing slash....
The problem with not using xyz/* is differentiating between create and
modify operations.
If a POST to xyz/ always creates a new node under it, how to you
update a property on xyz itself?
Being able to use PUT would be the answer, but browsers don't do that.
Browsers do with XHR; is this required to work with forms? (as you can
guess from that question, I'm a total newbie wrt Sling).
We could have used HTTP headers to make a POST behave like a PUT, but
I think the magic star is easier to use from browsers, and more
visible than a HTTP header.
It's definitively better than a header.
So my answer is: we currently use xyz/* as a workaround, to
differentiate between "create" and "modify" when working with today's
browsers as clients.
One could imagine other ways to hack it into the URL, such as path
parameters or query parameters...
BR, Julian