boost::urls::url_base::normalize_authority

Normalize the URL authority

Synopsis

Declared in <boost/url/url_base.hpp>

url_base&
normalize_authority();

Description

Applies Syntax‐based normalization to the URL authority.

The host is normalized to lowercase. Percent‐encoding triplets are normalized to uppercase letters. Percent‐encoded octets that correspond to unreserved characters are decoded.

assert( url( "http://www.Example.com" ).normalize_authority().buffer() == "http://www.example.com" );
assert( url( "http://www.%65xample.com" ).normalize_authority().buffer() == "http://www.example.com" );

Exception Safety

Strong guarantee. Calls to allocate may throw.

Return Value

*this

Created with MrDocs