couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Young (JIRA)" <>
Subject [jira] [Created] (COUCHDB-1688) Add query param for returning document on DELETE
Date Fri, 08 Mar 2013 14:46:12 GMT
Benjamin Young created COUCHDB-1688:

             Summary: Add query param for returning document on DELETE
                 Key: COUCHDB-1688
             Project: CouchDB
          Issue Type: Improvement
          Components: HTTP Interface
            Reporter: Benjamin Young

This would simplify "move" operations by lowering the number of "trips" to the server.

(pseudo HTTP below)

DELETE /db/test_doc?rev=1-whatever&include_doc=true

200 OK
"doc": {"test":"JSON", "type":"testing"}}

With the full doc available in the doc key in the DELETE response, the developer could simply
pull out the value of doc (modify it if needed), and PUT it back somewhere else.

Currently, this "flow" looks more like this:

GET /db/test_doc
# keep doc in memory/cache in the app
DELETE /db/test_doc?rev=1-whatever
PUT /db/new_doc_location
# use doc from memory/cache in app

Maybe a "nice to have" but it would be nice to have. :)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message