:relfileprefix: ../../../ [#BC4ECA8583ADCA9516347068D911826F3B9DB8D7] = Function url::set_encoded_authority pass:v,q[Set the authority] == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/url.adoc[url]& set_encoded_authority(xref:boost/urls/pct_string_view.adoc[pct_string_view] s); ---- == Description pass:v,q[This function sets the authority] pass:v,q[to the specified string.] pass:v,q[The string may contain percent-escapes.] === Example [,cpp] ---- assert( url().set_encoded_authority( "My%20Computer" ).has_authority() ); ---- === Exception Safety pass:v,q[Strong guarantee.] pass:v,q[Calls to allocate may throw.] pass:v,q[Exceptions thrown on invalid input.] === BNF [,cpp] ---- authority = [ userinfo "@" ] host [ ":" port ] userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) host = IP-literal / IPv4address / reg-name port = *DIGIT ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2[ 3.2. Authority (rfc3986)] == Return Value * `` == Parameters |=== | Name | Type | *s* | `pct_string_view` |===