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 2012/05/05 19:45:57 UTC
[Couchdb Wiki] Trivial Update of "HTTP_Bulk_Document_API" by ThomasVanderStichele
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: