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] Trivial Update of "HTTP_Bulk_Document_API" by ThomasVanderStichele
Date Sat, 05 May 2012 17:45:57 GMT
Dear Wiki user,

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

The "HTTP_Bulk_Document_API" page has been changed by ThomasVanderStichele:
http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API?action=diff&rev1=15&rev2=16

Comment:
example does not work without content type

  $ DB="http://127.0.0.1:5984/tstconf"
  $ curl -X PUT "$DB"
  $ curl -X PUT -d '{"name":"fred"}' "$DB/person"
- $ curl -X POST -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"jim"}]}'
"$DB/_bulk_docs"
+ $ curl -X POST -H 'Content-Type: application/json' -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"jim"}]}'
"$DB/_bulk_docs"
- $ curl -X POST -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"trunky"}]}'
"$DB/_bulk_docs"
+ $ curl -X POST -H 'Content-Type: application/json' -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"trunky"}]}'
"$DB/_bulk_docs"
  $ curl "$DB/person?conflicts=true"
  }}}
  Result:

Mime
View raw message