|
From: Richy <kle...@gm...> - 2010-06-11 02:41:35
|
Dear List,
this is probably a rather simple question, however I have failed to
find a solution.
I'm trying to use cpp-netlib with couchdb in a project.
CouchDB uses Views to get data and it is possible to filter result by
passing a key. In my case that key would be in the form of:
["key1", "key2"]
I figured out that one has to manually escape the quotation-signs, but
I'm not aware of am escape sequence for the [ sign. However, it
doesn't get transmitted and the rest is skipped as well.
sample-Code.
std::string requestURI = dbUrl;
requestURI.append("/_design/user/_view/getUserHistory?key=[%22");
requestURI.append(missionID);
requestURI.append("%22,%22");
requestURI.append(userID);
requestURI.append("%22]");
http::client client(http::client::follow_redirects);
http::client::request request(requestURI);
http::client::response response = client.get(request);
I hope the answer is not too obvious but still out there.
Any help would be appreciated!
Thanks a lot
Richard
|