| 115 | bool Uri::isValid() const { return this->_url.has_value(); } |
| 116 | |
| 117 | std::string_view Uri::getScheme() const { |
| 118 | if (!this->isValid()) { |
| 119 | return {}; |
| 120 | } |
| 121 | |
| 122 | return this->_hasScheme ? this->_url->get_protocol() : std::string_view{}; |
| 123 | } |
| 124 | |
| 125 | std::string_view Uri::getHost() const { |
| 126 | if (!this->isValid()) { |
no test coverage detected