couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Candler (JIRA)" <>
Subject [jira] Created: (COUCHDB-642) Support rev in PUT URL
Date Mon, 08 Feb 2010 16:26:27 GMT
Support rev in PUT URL

                 Key: COUCHDB-642
             Project: CouchDB
          Issue Type: New Feature
          Components: HTTP Interface
         Environment: trunk 08 Feb 2010
            Reporter: Brian Candler
            Priority: Minor

A DELETE request lets you append ?rev=xxxx to the URL. But this doesn't work with a PUT request;
you have to put the _rev in the body instead (even though the _id is taken from the URL path)

$ curl -X PUT -d "{}" http://brianadmin:brianadmin@

$ curl -X PUT -d "{}" http://brianadmin:brianadmin@
{"error":"conflict","reason":"Document update conflict."}

$ curl -X PUT -d '{"_rev":"1-967a00dff5e02add41819138abb3284d"}' http://brianadmin:brianadmin@

Allowing ?rev in the URL would make PUT and DELETE more consistent, and would allow you to
replace an existing JSON doc with another one without having to merge the _rev into it first.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message