39#include <unordered_set>
61 std::string parse_user_information(
const std::string& aRest);
62 std::string parse_host(
const std::string& aRest);
63 void parse_port(
const std::string& aRest);
74 uri(
const std::string& aUri);
79 const std::string&
path()
const;
80 const std::string&
query()
const;
88 static std::string
escaped(
const std::string& aString);
91 void parse_authority(
const std::string& aRest);
92 std::string parse_path(
const std::string& aRest);
93 std::string parse_query(
const std::string& aRest);
94 std::string parse_fragment(
const std::string& aRest);
95 std::string parse_scheme(
const std::string& aRest);
101 std::string iFragment;
104 template <
typename Elem,
typename Traits>
105 inline std::basic_ostream<Elem, Traits>& operator<<(std::basic_ostream<Elem, Traits>& aStream,
const uri_authority& aUriAuthority)
109 if (aUriAuthority.
host() != std::nullopt)
111 if (aUriAuthority.
port() != std::nullopt)
112 aStream <<
":" << *aUriAuthority.
port();
116 template <
typename Elem,
typename Traits>
117 inline std::basic_ostream<Elem, Traits>& operator<<(std::basic_ostream<Elem, Traits>& aStream,
const uri& aUri)
120 if (!aUri.query().empty())
122 if (!aUri.fragment().empty())
std::optional< host_type > optional_host
uri_authority(const std::string &aAuthority)
std::string user_information_type
const optional_host & host() const
std::optional< port_type > optional_port
const optional_user_information & user_information() const
const optional_port & port() const
std::optional< user_information_type > optional_user_information
static std::string escaped(const std::string &aString)
const uri_authority & authority() const
void set_fragment(const std::string &aFragment)
void set_path(const std::string &aPath)
const std::string & fragment() const
std::string to_string() const
const std::string & query() const
const std::string & path() const
void set_query(const std::string &aQuery)
static std::string unescaped(const std::string &String)
void set_scheme(const std::string &aScheme)
const std::string & scheme() const
void set_authority(const uri_authority &aAuthority)
uri(const std::string &aUri)