![]() |
Home | Libraries | People | FAQ | More |
Set the authority.
url_base& set_encoded_authority( pct_string_view s);
This function sets the authority to the specified string. The string may contain percent-escapes.
assert( [link url.ref.boost__urls__url_base.url `url`]().[link url.ref.boost__urls__url_base.set_encoded_authority `set_encoded_authority`]( "My%20Computer" ).[link url.ref.boost__urls__url_base.has_authority `has_authority`]() );
Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.
Type |
Thrown On |
---|---|
|
The string contains an invalid percent-encoding. |
Name |
Description |
---|---|
|
The authority string to set. |
[link url.ref.boost__urls__url_base.authority `authority`] = [ [link url.ref.boost__urls__url_base.userinfo `userinfo`] "@" ] [link url.ref.boost__urls__url_base.host `host`] [ ":" [link url.ref.boost__urls__url_base.port `port`] ] [link url.ref.boost__urls__url_base.userinfo `userinfo`] = *( unreserved / pct-encoded / sub-delims / ":" ) [link url.ref.boost__urls__url_base.host `host`] = IP-literal / IPv4address / reg-[link url.ref.boost__urls__host_type `name`] [link url.ref.boost__urls__url_base.port `port`] = *DIGIT