Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-28-2016, 03:09 AM   #1
Registered: Nov 2015
Posts: 248

Rep: Reputation: Disabled
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:
curl -vX PUT
curl -vX POST htp:// -d '{"source":"albums","target":"albums-replica"}'
I the following error:
{"error":"bad_content_type","reason":"Content-Type must be application/json"}
What have I missed or got wrong here, I am trying to follow this tutorial but it's not very easy trying to decipher syntax you have never seen before.

Any help would be much appreciated.

Kind regards
Old 06-28-2016, 03:20 AM   #2
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
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:
curl -H 'Content-Type: application/json' -X POST -d '{"source":"albums","target":"albums-replica"}'
Kind regards


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
couchdb and Erlang problem iFunction Linux - Newbie 1 07-03-2016 05:17 PM
LXer: Goodbye, CouchDB LXer Syndicated Linux News 0 05-11-2012 01:30 AM
LXer: An Introduction to CouchDB LXer Syndicated Linux News 0 11-02-2009 10:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration