pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
URI Query parsing library for C++
For sake of learning and knowing the web application ecosystem for C++, I
am developing a small web application in C++.
As one of the ways, I am using fcgi library with lighttpd server.
First thing I stumble upon, quite surprisingly, is hard to find library
for parsing query string in a URI.
textproc/uriparser [1] has some APIs. But it is a C API. It would take
some wrapping around to make it usable easily in C++. (E.g. building a
key-value map by walking over the list at the cost of one additional walk)
There is boost::url. But just for a small requirement, don't feel like
adding devel/boost-headers in the stack.
Most forums seem to suggest, write a parser yourself. That's an option,
too. But in 2025 one would expect some de facto component for such a
generic requirement.
I came across this [2] and am about to create a wip package for it.
Just thought of checking here, if anyone has faced this situation and used
which library or own implementation.
[1] https://uriparser.github.io/doc/api/latest/
[2] https://github.com/salzaverde/cppsimpleuri
--
Mayuresh
Home |
Main Index |
Thread Index |
Old Index