It seams intuitive that _show actually shows you something and does
not handle update actions.
On the other hand why would we need an _update thing? Doesn't CouchDB
handle that itself?
(Excuse me if the question is stupid, I was not on #couchdb at the
time when this discussion took place.)
On Sun, Sep 13, 2009 at 1:00 AM, Benoit Chesneau <bchesneau@gmail.com> wrote:
> Following our discussion with jan____ and jchris on irc i'm asking
> here my question if having POST/PUT on _show wouldn't be enough rather
> than having a special handler for this. Main raison about it, would be
> that it would me more restful. Imho it also offers a simple API on
> client side.
>
> jan__ args that it would mess the api. And indeed if you accept
> POST/PUT you need to say to couchdb what you return (doc, http
> response, newdoc ...). I guess defaults could be POST = new doc, PUT =
> update doc like current api on /db/docid, maybe ther is a smart way to
> handle it. I was thinking to something like sammyjs, with get/post/put
> response and filter on Accept format which is now handle by
> respondWith.
>
> What do you think about it ? The proper point is to replace or skip
> the need of another handler and make it more simple/restful.
>
> - benoit
>
|