Class url

A modifiable container for a URL.

Synopsis

class url
    : public url_base;

Defined in file <include/boost/url/url.hpp> on line 63

Member Functions

Name

Description

~url

Destructor

url

Constructor

url

Constructor

url

Constructor

url

Constructor

url

Constructor

operator=

Assignment

operator=

Assignment

operator=

Assignment

swap

Swap the contents.

set_scheme

Set the scheme

set_scheme_id

url_base::set_scheme_id

remove_scheme

Remove the scheme

set_encoded_authority

Set the authority

remove_authority

Remove the authority

set_userinfo

Set the userinfo

set_encoded_userinfo

Set the userinfo.

remove_userinfo

Remove the userinfo

set_user

Set the user

set_encoded_user

Set the user

set_password

Set the password.

set_encoded_password

Set the password.

remove_password

Remove the password

set_host

Set the host

set_encoded_host

Set the host

set_host_address

Set the host to an address

set_encoded_host_address

Set the host to an address

set_host_ipv4

Set the host to an address

set_host_ipv6

Set the host to an address

set_host_ipvfuture

Set the host to an address

set_host_name

Set the host to a name

set_encoded_host_name

Set the host to a name

set_port_number

Set the port

set_port

Set the port

remove_port

Remove the port

set_path

Set the path.

set_encoded_path

Set the path.

set_query

Set the query

set_encoded_query

Set the query

set_params

Set the query params

set_encoded_params

Set the query params

remove_query

Remove the query

remove_fragment

Remove the fragment

set_fragment

Set the fragment.

set_encoded_fragment

Set the fragment.

remove_origin

Remove the origin component

normalize

Normalize the URL components

normalize_scheme

Normalize the URL scheme

normalize_authority

Normalize the URL authority

normalize_path

Normalize the URL path

normalize_query

Normalize the URL query

normalize_fragment

Normalize the URL fragment

Friends

Name

Description

hash

swap

Swap

Description

This container owns a url, represented by a null-terminated character buffer which is managed by performing dymamic memory allocations as needed. The contents may be inspected and modified, and the implementation maintains a useful invariant: changes to the url always leave it in a valid state.

Exception Safety

  • Functions marked noexcept provide the no-throw guarantee, otherwise:

  • Functions which throw offer the strong exception safety guarantee.

BNF

URI-reference = URI / relative-ref

URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

relative-ref  = relative-part [ "?" query ] [ "#" fragment ]

absolute-URI  = scheme ":" hier-part [ "?" query ]