diff options
author | Paul Joseph Davis <davisp@apache.org> | 2010-11-10 19:44:05 +0000 |
---|---|---|
committer | Paul Joseph Davis <davisp@apache.org> | 2010-11-10 19:44:05 +0000 |
commit | 9e53f467f89bc3942f8795f6d07f61d3f5115f88 (patch) | |
tree | 8480eaf7c98101322fc3b5fc00891685082fc944 /src/couchdb/couch_httpd_db.erl | |
parent | 1f7e7cb5c22302788e232ce455fd0505f6420201 (diff) |
Support the keys parameter in GET requests.
You can now request a list of keys in the query string using a query
string like:
?keys=["foo", "bar"]
Your query string obviously needs to be properly escaped.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1033676 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 77b891fe..2ef2fe4f 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -375,7 +375,8 @@ db_req(#httpd{path_parts=[_,<<"_purge">>]}=Req, _Db) -> send_method_not_allowed(Req, "POST"); db_req(#httpd{method='GET',path_parts=[_,<<"_all_docs">>]}=Req, Db) -> - all_docs_view(Req, Db, nil); + Keys = couch_httpd:qs_json_value(Req, "keys", nil), + all_docs_view(Req, Db, Keys); db_req(#httpd{method='POST',path_parts=[_,<<"_all_docs">>]}=Req, Db) -> couch_httpd:validate_ctype(Req, "application/json"), |