curl - Uploading multiple documents to couchdb giving error -
i have upload bulk document
couchdb not working , giving error. try curl
curl -d '{"docs":[{"key":"baz","name":"bazzel"},{"key":"bar","name":"barry"}]}' -x post http://127.0.0.1:5984/testdb/_bulk_docs
this error comes this
{"error":"bad_content_type","reason":"content-type must application/json"}
this curl command simple copy+paste wiki of couchdb ideally should not giving error. there missing?
add header content-type application/json curl command. flag -h
e.g.
curl -h 'content-type: application/json' -d '{"docs":[{"key":"baz","name":"bazzel"},{"key":"bar","name":"barry"}]}' -x post http://127.0.0.1:5984/testdb/_bulk_docs
Comments
Post a Comment