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_view.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_view.erl')
-rw-r--r-- | src/couchdb/couch_httpd_view.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_view.erl b/src/couchdb/couch_httpd_view.erl index 8829de02..63e737e8 100644 --- a/src/couchdb/couch_httpd_view.erl +++ b/src/couchdb/couch_httpd_view.erl @@ -57,7 +57,8 @@ design_doc_view(Req, Db, DName, ViewName, Keys) -> handle_view_req(#httpd{method='GET', path_parts=[_, _, DName, _, ViewName]}=Req, Db, _DDoc) -> - design_doc_view(Req, Db, DName, ViewName, nil); + Keys = couch_httpd:qs_json_value(Req, "keys", nil), + design_doc_view(Req, Db, DName, ViewName, Keys); handle_view_req(#httpd{method='POST', path_parts=[_, _, DName, _, ViewName]}=Req, Db, _DDoc) -> |