kurious
kurious

Reputation: 1044

CouchDB replication error - Only POST allowed

I am trying to replicate a database partially on CouchDB. This is my query that I am implementing using Command Prompt:

CURL POST http://localhost:5984/_replicate HTTP/1.1 Content-Type: application/json {"source":"source_db", "target":"target_db", "doc_ids":["00123f8-8uht1-81ia-n1762-81ubas81762121iaj1"]}

This is the error:

Failed to connect to POST port 80: Timed Out
{"error":"method_not_allowed", "reason":"Only POST allowed"}

What is causing the error and how do I get rid of it?

Upvotes: 0

Views: 991

Answers (1)

hrbu
hrbu

Reputation: 173

Your curl command is missing the "-X" before "POST" ... so curl does not identify your "POST" as the method.

see examples with curl in the docs: https://wiki.apache.org/couchdb/Replication#One-shot_Replication

Upvotes: 5

Related Questions