Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit e70692e4d8.
PrevUpHomeNext
static_url::set_encoded_authority

(Inherited from url_base)

Set the authority.

Synopsis
url_base&
set_encoded_authority(
    pct_string_view s);
Description

This function sets the authority to the specified string. The string may contain percent-escapes.

Example
assert( url().set_encoded_authority( "My%20Computer" ).has_authority() );
Exception Safety

Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.

Exceptions

Type

Thrown On

system_eror

The string contains an invalid percent-encoding.

Parameters

Name

Description

s

The authority string to set.

BNF
authority     = [ userinfo "@" ] host [ ":" port ]

userinfo      = *( unreserved / pct-encoded / sub-delims / ":" )
host          = IP-literal / IPv4address / reg-name
port          = *DIGIT
Specification
See Also

remove_authority.


PrevUpHomeNext