1

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?

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

4 Comments

You mean like this: curl -X GET http: //localhost:5984/db/_design/records/_view/query?key=[%22abc.com%22,%22215.211.211.211%22] ...?
Basically every non alphanumeric needs to be encoded, here's a google result I got for "url encoding"
Why, oh why @smathy? That really hurt. Linking to w3schools is just ... oy!
I've never understood the w3schools hate - I think they do a decent job in their market. But really I just picked the first google result.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.