From: Jeroen H. <vex...@gm...> - 2010-02-04 22:24:36
|
On Thu, Feb 4, 2010 at 23:18, Nelson, Erik - 2 <eri...@ba...> wrote: > Jeroen Habraken wrote: > >>Ah, in that case it makes sense, "/test?arg=5" is a relative URI, not > an >> absolute one, and something we decided not to support in the URI > parser. > > That's fair enough, though it does seem a little counter-intuitive that > the value in request.uri can't be parsed. Is there support in > cpp-netlib for digging out the arguments, or will I need to write my own > parser to grab things like 'arg=5'? > > Erik > You can call query() on a uri and http::uri to grab the query string, but we currently don't have a parser for them yet. It's on my TODO list though. You could give writing one yourself based on http://boost-spirit.com/home/articles/qi-example/parsing-a-list-of-key-value-pairs-using-spirit-qi/ a shot, it shouldn't be too hard. Jeroen |