couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manokaran K <manoka...@gmail.com>
Subject posting to _bulk_docs throws Unsupported Media Type error
Date Sun, 25 Jul 2010 04:35:18 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message