couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject POST/PUT on _show vs POST/PUT on _update + GET on _show
Date Sun, 13 Sep 2009 08:00:14 GMT
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

Mime
View raw message