diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-06-30 21:20:37 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-06-30 21:20:37 -0700 |
commit | a43820d0b4014878e4bbfede6acde25f5830faa7 (patch) | |
tree | 58892b88fe5927b04b060af1501741c4766b7bee /include/Uri | |
parent | 58e2beb7717cf724ae37e03f2e5bf3afbfc23a35 (diff) |
Add support for port and hasPort elements
Diffstat (limited to 'include/Uri')
-rw-r--r-- | include/Uri/Uri.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/Uri/Uri.hpp b/include/Uri/Uri.hpp index fb1e5c8..4907aaf 100644 --- a/include/Uri/Uri.hpp +++ b/include/Uri/Uri.hpp @@ -10,6 +10,7 @@ */ #include <memory> +#include <stdint.h> #include <string> #include <vector> @@ -84,6 +85,29 @@ namespace Uri { */ std::vector< std::string > GetPath() const; + /** + * This method returns an indication of whether or not the + * URI includes a port number. + * + * @return + * An indication of whether or not the + * URI includes a port number is returned. + */ + bool HasPort() const; + + /** + * This method returns the port number element of the URI, + * if it has one. + * + * @return + * The port number element of the URI is returned. + * + * @note + * The returned port number is only valid if the + * HasPort method returns true. + */ + uint16_t GetPort() const; + // Private properties private: /** |