[#boost-urls-url_view_base-authority] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_view_base.adoc[url_view_base]::authority :relfileprefix: ../../../ :mrdocs: Return the authority == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#L524[boost/url/url_view_base.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/authority_view.adoc[authority_view] authority() const noexcept; ---- == Description This function returns the authority as an xref:boost/urls/authority_view.adoc[authority_view]. === Example [,cpp] ---- authority_view a = url_view( "https://www.example.com:8080/index.htm" ).authority(); ---- === Complexity Constant. === Exception Safety Throws nothing. === BNF [,cpp] ---- authority = [ userinfo "@" ] host [ ":" port ] ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2[3.2. Authority (rfc3986)] Return the authority This function returns the authority as an xref:boost/urls/authority_view.adoc[authority_view]. === Example [,cpp] ---- authority_view a = url_view( "https://www.example.com:8080/index.htm" ).authority(); ---- === Complexity Constant. === Exception Safety Throws nothing. === BNF [,cpp] ---- authority = [ userinfo "@" ] host [ ":" port ] ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2[3.2. Authority (rfc3986)] == See Also xref:boost/urls/url_view_base/encoded_authority.adoc[encoded_authority], xref:boost/urls/url_view_base/has_authority.adoc[has_authority]. xref:boost/urls/url_view_base/encoded_authority.adoc[encoded_authority], xref:boost/urls/url_view_base/has_authority.adoc[has_authority]. [.small]#Created with https://www.mrdocs.com[MrDocs]#