Couchdb replicate
Hi there,
I'm afraid I am having a difficult time with json syntax, as the tutorial I am reading has some errors. So I am now trying to duplicate a database using cURL, and the syntax I have for this is: Code:
curl -vX PUT http://127.0.0.1:5984/albums-replica Code:
{"error":"bad_content_type","reason":"Content-Type must be application/json"} Any help would be much appreciated. Kind regards iFunc |
My appologies,
I have suddenly chanced upon the answer, the syntax needs the ' -H Content-type: application/json' in the command and it should look as follows: Code:
curl -H 'Content-Type: application/json' -X POST http://127.0.0.1:5984/_replicate -d '{"source":"albums","target":"albums-replica"}' iFunk |
All times are GMT -5. The time now is 04:45 AM. |