mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-10-14 15:20:36 +00:00
Add CurlWrapper class and use it to escape GET/POST values.
Use the new code to print the values from the request.
This commit is contained in:
parent
6a502df135
commit
cc20a8ccfb
10 changed files with 143 additions and 17 deletions
|
@ -9,7 +9,7 @@
|
|||
#include <boost/range/algorithm/find.hpp>
|
||||
|
||||
namespace tawashi {
|
||||
KeyValueList split_env_vars (const std::string& parList) {
|
||||
RawKeyValueList split_env_vars (const std::string& parList) {
|
||||
using MatchRange = boost::iterator_range<std::string::const_iterator>;
|
||||
using boost::token_finder;
|
||||
using boost::adaptors::transformed;
|
||||
|
@ -23,7 +23,7 @@ namespace tawashi {
|
|||
//https://stackoverflow.com/questions/27999941/how-to-use-boostsplit-with-booststring-ref-in-boost-1-55
|
||||
//http://www.boost.org/doc/libs/1_60_0/doc/html/boost/algorithm/token_finder.html
|
||||
//https://stackoverflow.com/questions/20781090/difference-between-boostsplit-vs-boostiter-split
|
||||
return boost::copy_range<KeyValueList>(
|
||||
return boost::copy_range<RawKeyValueList>(
|
||||
make_iterator_range(
|
||||
split_iterator<std::string::const_iterator>(parList, token_finder([](char c){return '&'==c;})),
|
||||
split_iterator<std::string::const_iterator>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue