You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/03/07 04:08:51 UTC
[Couchdb Wiki] Update of "HTTP Document API" by RobertSchonberger
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 RobertSchonberger:
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 ''409'' 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 ''412'' 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.