:relfileprefix: ../../../ [#boost-urls-url_view_base-encoded_authority] = xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/url_view_base.adoc[pass:[url_view_base]]::encoded_authority Return the authority. == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/pct_string_view.adoc[pct_string_view] encoded_authority() const noexcept; ---- == Description If present, this function returns a string representing the authority (which may be empty). Otherwise it returns an empty string. The returned string may contain percent escapes. === Example [,cpp] ---- assert( url_view( "file://Network%20Drive/My%2DFiles" ).encoded_authority() == "Network%20Drive" ); ---- === 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/authority.adoc[authority] , xref:boost/urls/url_view_base/has_authority.adoc[has_authority] .