diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-06-30 22:30:19 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-06-30 22:30:19 -0700 |
commit | 8c752fdcf71f1d8f3980c8066e2bedf782d9739c (patch) | |
tree | 7bc5ad87eff0ddd584f77c08858c240cd6839721 /include/Uri | |
parent | a43820d0b4014878e4bbfede6acde25f5830faa7 (diff) |
Add more element parsing of URIs
* Add IsRelativeReference.
* Add IsRelativePath.
* Add Query.
* Add Fragment.
* Add UserInfo.
* Fix parsing of URIs that have no scheme.
Diffstat (limited to 'include/Uri')
-rw-r--r-- | include/Uri/Uri.hpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/Uri/Uri.hpp b/include/Uri/Uri.hpp index 4907aaf..8be3dd0 100644 --- a/include/Uri/Uri.hpp +++ b/include/Uri/Uri.hpp @@ -61,6 +61,17 @@ namespace Uri { std::string GetScheme() const; /** + * This method returns the "UserInfo" element of the URI. + * + * @return + * The "UserInfo" element of the URI is returned. + * + * @retval "" + * This is returned if there is no "UserInfo" element in the URI. + */ + std::string GetUserInfo() const; + + /** * This method returns the "host" element of the URI. * * @return @@ -108,6 +119,50 @@ namespace Uri { */ uint16_t GetPort() const; + /** + * This method returns an indication of whether or not + * the URI is a relative reference. + * + * @return + * An indication of whether or not the URI is a + * relative reference is returned. + */ + bool IsRelativeReference() const; + + /** + * This method returns an indication of whether or not + * the URI contains a relative path. + * + * @return + * An indication of whether or not the URI contains a + * relative path is returned. + */ + bool ContainsRelativePath() const; + + /** + * This method returns the "query" element of the URI, + * if it has one. + * + * @return + * The "query" element of the URI is returned. + * + * @retval "" + * This is returned if there is no "query" element in the URI. + */ + std::string GetQuery() const; + + /** + * This method returns the "fragment" element of the URI, + * if it has one. + * + * @return + * The "fragment" element of the URI is returned. + * + * @retval "" + * This is returned if there is no "fragment" element in the URI. + */ + std::string GetFragment() const; + // Private properties private: /** |