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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Cpp-netlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel

Reply via email to