boost::urls::url_view_base::has_authority

Return true if an authority is present

Synopsis

Declared in <include/boost/url/url_view_base.hpp>

bool
has_authority() const noexcept;

Description

This function returns true if the url contains an authority. The presence of an authority is denoted by a double slash ("//") at the beginning or after the scheme.

assert( url_view( "http://www.example.com/index.htm" ).has_authority() );

Constant.

Throws nothing.

authority = [ userinfo "@" ] host [ ":" port ] URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] absolute-URI = scheme ":" hier-part [ "?" query ] URI-reference = URI / relative-ref relative-ref = relative-part [ "?" query ] [ "#" fragment ] hier-part = "//" authority path-abempty ; (more...) relative-part = "//" authority path-abempty ; (more...)
  • 3.2. Authority (rfc3986)
  • See Also

    authority , encoded_authority .

    Created with MrDocs