boost::urls::url::normalize_authority :: Boost Libraries Documentation

# boost::urls::url::normalize_authority

Normalize the URL authority

## Synopsis

Declared in `<boost/url/url.hpp>`

    url&
    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.

## Specification

- 6.2.2 Syntax‐Based Normalization (rfc3986)

## Return Value

`*this`

Created with MrDocs