我尝试使用以下方法添加用户:
curl -X PUT -u myUsername:myPassword http://kaydee.iriscouch.com/_users/org.couchdb.user:myNewUsername -d '{"name":"myNewUsername", "password":"myNewUserPassword", "roles":["reporter", "reader"], "type":"user"}' -H "Content-Type: application/json"
回应是:
{"error":"bad_request","reason":"invalid_json"}
curl: (6) Could not resolve host: password
curl: (3) [globbing] error: bad range specification after pos 8
curl: (3) [globbing] unmatched close brace/bracket at pos 7
curl: (3) [globbing] unmatched close brace/bracket at pos 10
我使用的是 Windows 8。我需要对命令进行任何更改吗?
而且我相信 IrisCouch 正在使用 CouchDB 1.2。