couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "HTTP Document API" by DanLarkin
Date Sun, 17 May 2009 06:59:01 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by DanLarkin:
http://wiki.apache.org/couchdb/HTTP_Document_API

------------------------------------------------------------------------------
  {"ok": true, "id": "some_doc_id", "rev": "946B7D1C"}
  }}}
  
- To update an existing document, you also issue a ''PUT'' request. In this case, the JSON
body must contain a ''_rev'' property, which lets CouchDB know which revision the edits are
based on. If the revision of the document currently stored in the database doesn't match,
then a ''412'' conflict error is returned.
+ To update an existing document, you also issue a ''PUT'' request. In this case, the JSON
body must contain a ''_rev'' property, which lets CouchDB know which revision the edits are
based on. If the revision of the document currently stored in the database doesn't match,
then a ''409'' conflict error is returned.
  
  If the revision number does match what's in the database, a new revision number is generated
and returned to the client.
  
@@ -192, +192 @@

  And here is the server's response if there is an update conflict (what is currently stored
in the database is not revision ''946B7D1C'' of document ''some_doc_id'').
  
  {{{
- HTTP/1.1 412 Precondition Failed
+ HTTP/1.1 409 Conflict
  Date: Thu, 17 Aug 2006 05:39:28 +0000GMT
  Content-Length: 33
  Connection: close

Mime
View raw message