The message is pretty straightforward. Just set the Content-Type: application/json header and all should be right with the world.
Well, maybe not the world :-P. Cheers, Randall On Jul 24, 2010 9:35 PM, "Manokaran K" <[email protected]> wrote: Hi, I'm trying trying out CouchDB 1.0. When I try the bulk_docs API I get an Unsupported Media Type error. The following is the transcript: :~$ curl -vX POST http://localhost:5984/spulz/_bulk_docs -d '{ "docs" : [{"key1": "val1"}, {"key2": "val2"}]}' * About to connect() to localhost port 5984 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 5984 (#0) > POST /spulz/_bulk_docs HTTP/1.1 > User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10 > Host: localhost:5984 > Accept: */* > Content-Length: 48 > Content-Type: application/x-www-form-urlencoded > < HTTP/1.1 415 Unsupported Media Type < Server: CouchDB/1.0.0 (Erlang OTP/R12B) < Date: Sun, 25 Jul 2010 04:23:50 GMT < Content-Type: text/plain;charset=utf-8 < Content-Length: 78 < Cache-Control: must-revalidate < {"error":"bad_content_type","reason":"Content-Type must be application/json"} * Connection #0 to host localhost left intact * Closing connection #0 AM I missing out on any dependencies? thanks, mano
