Set the zone ID for an IPv6 address (percent‐encoded).

Synopsis

Declared in <boost/url/url.hpp>

url&
set_encoded_zone_id(pct_string_view const& s);

Description

This function sets the zone ID for the host if the host is an IPv6 address. Escapes in the string are preserved, and reserved characters in the string are percent‐escaped in the result.

Example

assert( u.set_host_ipv6( ipv6_address( "fe80::1" ) ).set_encoded_zone_id( "eth0" ).buffer() == "https://[fe80::1%25eth0]" );

Complexity

Linear in this‐>size().

Exception Safety

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

Specification

Return Value

*this

Parameters

Name

Description

s

The zone ID to set.

Created with MrDocs