![]() |
Home | Libraries | People | FAQ | More |
Return the host name.
pct_string_view encoded_host_name() const;
If the host type is host_type::name
, this function returns the
name as a string. Otherwise, if the host type is not an name, it returns
an empty string. The returned string may contain percent escapes.
assert( [link url.ref.boost__urls__url_view_base.url_view `url_view`]( "https://www%2droot.example.com/" ).[link url.ref.boost__urls__url_view_base.encoded_host_name `encoded_host_name`]() == "www%2droot.example.com" );
Constant.
Throws nothing.
[link url.ref.boost__urls__url_view_base.host `host`] = IP-literal / IPv4address / reg-[link url.ref.boost__urls__host_type `name`] IP-literal = "[" ( IPv6address / IPvFuture ) "]" reg-[link url.ref.boost__urls__host_type `name`] = *( unreserved / pct-encoded / "-" / "." )