From: Jeroen H. <vex...@gm...> - 2010-06-11 07:29:03
|
Hi, On 11 June 2010 05:32, Dean Michael Berris <mik...@gm...> wrote: > Hi Richy, > > On Fri, Jun 11, 2010 at 10:41 AM, Richy <kle...@gm...> wrote: >> 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. > > You will need to use %5B for '[' and %5D for ']'. > > You can get a table from http://www.w3schools.com/TAGS/ref_urlencode.asp > > That said, it would be nice if someone can write a urlencode function > -- maybe as a Karma generator? :D Any takers? > > I would love to see one in boost/network/protocol/http/utils/ -- so if > you have tests and an implementation on your fork, I would love to get > this in 0.7. :) > > -- > Dean Michael Berris > deanberris.com > There's a url_decode and url_encode function already in http://github.com/mikhailberis/cpp-netlib/blob/master/boost/network/protocol/http/impl/message.ipp. Though I agree a Karma version would look better :) Jeroen |