Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 32906 invoked from network); 13 Sep 2009 08:00:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Sep 2009 08:00:44 -0000 Received: (qmail 27892 invoked by uid 500); 13 Sep 2009 08:00:44 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 27797 invoked by uid 500); 13 Sep 2009 08:00:44 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 27785 invoked by uid 99); 13 Sep 2009 08:00:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2009 08:00:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 72.14.220.159 as permitted sender) Received: from [72.14.220.159] (HELO fg-out-1718.google.com) (72.14.220.159) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2009 08:00:36 +0000 Received: by fg-out-1718.google.com with SMTP id 16so652267fgg.5 for ; Sun, 13 Sep 2009 01:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=JyI2dhLrLzsxyr6RdGx0kglIfQfj/USb0ftB7YU0zmM=; b=ni/5VVud2O91F0AkuiN+oRuRNy9R35Vw89dI7UyWltBoKnJ8yYkqHwy6mGO7eEHx8a jXSodNM2KYPPI5h2othFsv854yweKXwSEOE27b4bqLU8RATzRrjzT+WWhmCbJ6s1NEbO /VN3sS6kbOnskGMgaG09TZr/qWDeAwuzPO0Rs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=a2Uy7Z5gA9XP+1QpSfu6NdsUmGpIVNbw9UUd4rbFCo6TRkI05sMNG2eHZAdibIGLS2 utCdKmYTcgig/FxBLFDQpLmwSlWXjA32j1WDPkbEXL6G9NqPxFtT02qMtLdxmV1KaGis REZmwhNRSpOYDYfSr10/BfKvPRR7vQ2gOlwEo= MIME-Version: 1.0 Received: by 10.86.173.4 with SMTP id v4mr3772862fge.78.1252828814923; Sun, 13 Sep 2009 01:00:14 -0700 (PDT) Date: Sun, 13 Sep 2009 10:00:14 +0200 Message-ID: Subject: POST/PUT on _show vs POST/PUT on _update + GET on _show From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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