12namespace Azure {
namespace Data {
namespace Tables {
namespace _detail {
namespace Cryptography {
14 class UrlUtils final {
16 static std::string UrlEncodeQueryParameter(
const std::string& value)
18 const static std::string DoNotEncodeCharacters = []() {
20 std::string doNotEncodeCharacters =
"!$&'()*+,;=";
21 doNotEncodeCharacters +=
"/:@?";
22 doNotEncodeCharacters.erase(
24 doNotEncodeCharacters.begin(),
25 doNotEncodeCharacters.end(),
31 return x ==
'+' || x ==
'=' || x ==
'&';
33 doNotEncodeCharacters.end());
34 return doNotEncodeCharacters;
36 return Core::Url::Encode(value, DoNotEncodeCharacters);
39 static std::string UrlEncodePath(
const std::string& value)
41 const static std::string DoNotEncodeCharacters = []() {
43 std::string doNotEncodeCharacters =
"!$&'()*+,;=";
44 doNotEncodeCharacters +=
"/:@";
45 doNotEncodeCharacters.erase(
47 doNotEncodeCharacters.begin(),
48 doNotEncodeCharacters.end(),
53 doNotEncodeCharacters.end());
54 return doNotEncodeCharacters;
56 return Core::Url::Encode(value, DoNotEncodeCharacters);