set_host_name
Set the host to a name
Synopsis
url_base&
set_host_name(string_view s);
Declared in file <include/boost/url/url_base.hpp> on line 1425
Defined in file <src/url_base.cpp> on line 871
Description
The host is set to the specified string, which may be empty. Reserved characters in the string are percent-escaped in the result. The host type is host_type::name.
Example
assert( url( "http://www.example.com/index.htm").set_host_name( "localhost" ).host_address() == "localhost" );
Postconditions
this->has_authority() == true && this->host_ipv6_address() == addr && this->host_type() == host_type::name