大家好,我正在尝试使用以下请求:
curl http://localhost:5984/contacts/_design/country/_view/USA?startkey=["USA",{}]&endkey=["USA",{}].
基于以下 View :
{
"_id": "_design/country",
"_rev": "1-51488ea3931fdca9b9e2de84ef99c4d9",
"language": "javascript",
"views": {
"USA": {
"map": "function(doc) {\nif(doc.type == \"contact\") \nemit([doc.country,doc.name] , {name: doc.name, email: doc.email});\n}\n"
}
}
}
我收到此错误:[globbing] 第 72 列中的范围错误
你能帮我吗?
最佳答案
我想问题出在 cUrl 上?试试这个:
-g/--globoff
This option switches off the "URL globbing parser". When you set this option, you can
specify URLs that contain the letters {}[] without having them being interpreted by curl
itself. Note that these letters are not normal legal URL contents but they should be
encoded according to the URI standard.
关于javascript - 在键数组中使用 startkey&endkey 时出现 CouchDB 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38263671/