Functions¶
-
std::string
url_encode
(const std::string &o, bool use_plus_space = true)¶ URL-encode a string
o
, escaping all reserved, special, or non-ASCII characters with percent-encoding.If
use_plus_space
istrue
, spaces will be replaced with+
rather than%20
.
-
std::string
url_decode
(const std::string&)¶ Decode a URL- or percent-encoded string. Throws
url_decode_error
if the input string is not validly encoded.