diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-07-04 16:30:34 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-07-04 16:30:34 -0700 |
commit | 872905197e3dbcdf0041930fda67cbd371c240ac (patch) | |
tree | 0f3c694e2b65eea87d0e6d3403353f0ef8f9b23e /include/Uri/Uri.hpp | |
parent | 4603102722e1cc2abc3494c9446bc576d008e7fa (diff) |
Add GenerateString (incomplete)
Add methods to set scheme, host, and query elements.
Add ability to generate URI strings out of scheme,
host, and query elements.
This does not yet support userinfo, port, or fragment elements.
Diffstat (limited to 'include/Uri/Uri.hpp')
-rw-r--r-- | include/Uri/Uri.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/Uri/Uri.hpp b/include/Uri/Uri.hpp index 1288a52..0b4a22c 100644 --- a/include/Uri/Uri.hpp +++ b/include/Uri/Uri.hpp @@ -212,6 +212,40 @@ namespace Uri { */ Uri Resolve(const Uri& relativeReference) const; + /** + * This method sets the scheme element of the URI. + * + * @param[in] scheme + * This is the scheme to set for the URI. + */ + void SetScheme(const std::string& scheme); + + /** + * This method sets the host element of the URI. + * + * @param[in] host + * This is the host to set for the URI. + */ + void SetHost(const std::string& host); + + /** + * This method sets the query element of the URI. + * + * @param[in] query + * This is the query to set for the URI. + */ + void SetQuery(const std::string& query); + + /** + * This method constructs and returns the string + * rendering of the URI, according to the rules + * in RFC 3986 (https://tools.ietf.org/html/rfc3986). + * + * @return + * The string rendering of the URI is returned. + */ + std::string GenerateString() const; + // Private properties private: /** |