Shnkc
Shnkc

Reputation: 2158

Error while calling CouchDB from curl with multiple keys

When I try to do a Couchdb query with curl, I get this error:

curl: (3) [globbing] illegal character in range specification at pos 100

My query looks like this:

curl -X GET http://localhost:5984/db/_design/records/_view/query?key=\[\"abc.com\",\"215.211.211.211\"\]

My view function is:

function(doc) {
    emit([doc.domain, doc.ip])
}

What could be the mistake?

Upvotes: 1

Views: 496

Answers (1)

smathy
smathy

Reputation: 27961

You need to url encode your query params, so %22 for " etc.

Upvotes: 1

Related Questions