:relfileprefix: ../../../ [#boost-urls-url_base-remove_authority] == xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/url_base.adoc[pass:[url_base]]::remove_authority Remove the authority === Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/url_base.adoc[url_base]& remove_authority(); ---- === Description This function removes the authority, which includes the userinfo, host, and a port if present. [,cpp] ---- assert( url( "http://example.com/echo.cgi" ).remove_authority().buffer() == "http:/echo.cgi" ); ---- [,cpp] ---- this->has_authority() == false && this->has_userinfo() == false && this->has_port() == false ---- === Linear in `this->size()`. === Throws nothing. [,cpp] ---- authority = [ userinfo "@" ] host [ ":" port ] userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) host = IP-literal / IPv4address / reg-name port = *DIGIT ---- * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2[ 3.2. Authority (rfc3986)] === See Also xref:boost/urls/url_base/set_encoded_authority.adoc[set_encoded_authority] .