I am trying to replicate a couchdb database using filters. This is my code that I am running using Command Prompt:
curl -H 'Content-Type: application/json' -X POST http://localhost:5984/_replicate -d '{"source": "http://localhost:5984/source_database", "target": "http://localhost:5984/testdb", "create_target": true, "continuous": true, "doc_ids": ["000803f8-7f61-4afd-b532-8e6c1028d965"]}'
I get the following error:
Illegal database name, Reason, name:'testdb, '.
For some reason, an unwanted comma gets added to the new database. Same problem if I specify a preexisting database name. What is causing the issue? How do I resolve the issue?
Solved. This is the solution:
These need to be done differently:
"
instead of'
for Content-Type\
in JSON as escape character