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 MalteStretz
Date Wed, 12 Jan 2011 15:27:31 GMT
Dear Wiki user,

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

The "HTTP_Document_API" page has been changed by MalteStretz.
http://wiki.apache.org/couchdb/HTTP_Document_API?action=diff&rev1=71&rev2=72

--------------------------------------------------

  ''batch=ok'' is not suitable for crucial data, but it ideal for applications like logging
which can accept the risk that a small proportion of updates could be lost due to a crash.
Docs in the batch can also be flushed manually using the ''_ensure_full_commit'' API.
  
  === POST ===
- The ''POST'' operation can be used to create a new document with a server generated DocID.
To create a named document, use the ''PUT'' method instead. It is recommended that you avoid
''POST'' when possible, because proxies and other network intermediaries will occasionally
resend ''POST'' requests, which can result in duplicate document creation. If your client
software is not capable of guaranteeing uniqueness of generated UUIDs, use a ''GET'' to ''/_uuids?count=100''
to retrieve a list of document IDs for future ''PUT'' requests. Please note that the ''/_uuids''-call
does not check for existing document ids; collision-detection happens when you are trying
to save a document.
+ The ''POST'' operation can be used to create a new document with a server generated DocID.
To do so, the URL must point to the database's location. To create a named document, use the
''PUT'' method instead.
+ 
+ It is recommended that you avoid ''POST'' when possible, because proxies and other network
intermediaries will occasionally resend ''POST'' requests, which can result in duplicate document
creation. If your client software is not capable of guaranteeing uniqueness of generated UUIDs,
use a ''GET'' to ''/_uuids?count=100'' to retrieve a list of document IDs for future ''PUT''
requests. Please note that the ''/_uuids''-call does not check for existing document ids;
collision-detection happens when you are trying to save a document.
  
  The following is an example HTTP ''POST''. It will cause the CouchDB server to generate
a new DocID and revision ID and save the document with it.
  

Mime
View raw message