diff --git a/modules/beast_asio/http/UniformResourceLocator.cpp b/modules/beast_asio/http/UniformResourceLocator.cpp index 7324c0c29..d1e76d5b4 100644 --- a/modules/beast_asio/http/UniformResourceLocator.cpp +++ b/modules/beast_asio/http/UniformResourceLocator.cpp @@ -69,6 +69,11 @@ UniformResourceLocator& UniformResourceLocator::operator= (UniformResourceLocato //------------------------------------------------------------------------------ +bool UniformResourceLocator::empty () const +{ + return m_scheme == String::empty; +} + String UniformResourceLocator::scheme () const { return m_scheme; diff --git a/modules/beast_asio/http/UniformResourceLocator.h b/modules/beast_asio/http/UniformResourceLocator.h index 557cadfb8..54c2b3ebc 100644 --- a/modules/beast_asio/http/UniformResourceLocator.h +++ b/modules/beast_asio/http/UniformResourceLocator.h @@ -46,6 +46,9 @@ public: /** Copy assign a URL. */ UniformResourceLocator& operator= (UniformResourceLocator const& other); + /** Returns `true` if this is an empty URL. */ + bool empty () const; + /** Returns the scheme of the URL. If no scheme was specified, the string will be empty. */