24 #ifndef CA_MGM_URLUTILS_HPP
25 #define CA_MGM_URLUTILS_HPP
27 #include <ca-mgm/config.h>
36 namespace CA_MGM_NAMESPACE
95 typedef std::map<std::string,std::string>
ParamMap;
168 encode(
const std::string &str,
169 const std::string &safe =
"",
186 const std::string &safe =
"",
205 decode(
const std::string &str);
225 decode_buf(
const std::string &str,
bool allowNUL);
279 std::vector<std::string>
280 split(
const std::string &pstr,
281 const std::string &psep);
313 split(
const std::string &pstr,
314 const std::string &psep,
315 const std::string &vsep,
334 join(
const std::vector<std::string> &parr,
335 const std::string &psep);
362 const std::string &psep,
363 const std::string &vsep,
364 const std::string &safe);
390 #endif // CA_MGM_URLUTILS_HPP
Definition: UrlUtils.hpp:120
std::string decode(const std::string &str)
std::string authority
Definition: UrlUtils.hpp:105
UrlComponents parse_url_string(const std::string &url)
bool has_user
Definition: UrlUtils.hpp:126
#define CA_MGM_DECLARE_EXCEPTION2(NAME, BASE)
Definition: Exception.hpp:152
std::string querystr
Definition: UrlUtils.hpp:107
Definition: UrlUtils.hpp:102
bool has_authority
Definition: UrlUtils.hpp:110
std::string pathdata
Definition: UrlUtils.hpp:106
std::string pass
Definition: UrlUtils.hpp:123
std::string fragment
Definition: UrlUtils.hpp:108
ca_mgm::url::ParamMap split(const std::string &pstr, const std::string &psep, const std::string &vsep, EEncoding eflag=E_ENCODED)
bool has_pass
Definition: UrlUtils.hpp:127
std::string host
Definition: UrlUtils.hpp:124
std::string encode_octet(const unsigned char c)
bool has_querystr
Definition: UrlUtils.hpp:111
std::map< std::string, std::string > ParamMap
Definition: UrlUtils.hpp:95
bool has_scheme
Definition: UrlUtils.hpp:109
std::string scheme
Definition: UrlUtils.hpp:104
bool has_fragment
Definition: UrlUtils.hpp:112
std::string encode(const std::string &str, const std::string &safe="", ca_mgm::url::EEncoding eflag=E_DECODED)
ca_mgm::ByteBuffer decode_buf(const std::string &str, bool allowNUL)
Buffer for storing binary data.
Definition: ByteBuffer.hpp:55
int decode_octet(const char *hex)
UrlAuthority parse_url_authority(const std::string &authority)
std::string user
Definition: UrlUtils.hpp:122
std::string encode_buf(const ca_mgm::ByteBuffer &buf, const std::string &safe="", ca_mgm::url::EEncoding eflag=E_DECODED)
std::string join(const ca_mgm::url::ParamMap &pmap, const std::string &psep, const std::string &vsep, const std::string &safe)
Flag to request decoded string(s).
Definition: UrlUtils.hpp:137
std::string port
Definition: UrlUtils.hpp:125
Flag to request encoded string(s).
Definition: UrlUtils.hpp:136
EEncoding
Definition: UrlUtils.hpp:135
bool has_port
Definition: UrlUtils.hpp:128
#define CA_MGM_DECLARE_EXCEPTION(NAME)
Definition: Exception.hpp:167