summaryrefslogtreecommitdiff
path: root/src/other_tools/utils/curl_url_handle.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/utils/curl_url_handle.hpp')
-rw-r--r--src/other_tools/utils/curl_url_handle.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/other_tools/utils/curl_url_handle.hpp b/src/other_tools/utils/curl_url_handle.hpp
index 5648a535..4680cb34 100644
--- a/src/other_tools/utils/curl_url_handle.hpp
+++ b/src/other_tools/utils/curl_url_handle.hpp
@@ -165,6 +165,11 @@ class CurlURLHandle {
std::string const& url,
std::string const& hostname) noexcept -> std::optional<std::string>;
+ /// \brief Gets the hostname from URL.
+ /// \returns The host name or std::nullopt if missing or on errors.
+ [[nodiscard]] static auto GetHostname(std::string const& url) noexcept
+ -> std::optional<std::string>;
+
private:
// IMPORTANT: the CurlContext must be initialized before any curl
// object!