Reputation: 11
I'm trying to use the replication in CouchDB.
When I enter the following code :
curl -X POST http://127.0.0.1:5984/_replicate \
-d ’{"source":"musica","target":"musica-replica"}’
I receive the following error:
{"error":"bad_content_type","reason":"Content-Type must be application/json"}
Can you help me?
Upvotes: 1
Views: 2563
Reputation: 28439
As the reason
said, you need to add a header that looks like: Content-Type: application/json
You can add this to curl via the -H "Content-Type: application/json"
flag.
Upvotes: 3