Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Containers

All URLs conform to the generic syntax. Every URL is either hierarchical, or opaque, with the hierarchical URLs further distinguished by whether they are relative or absolute. Here are some examples of URLs and their identification:

Table 1.1. URL Examples

URL

Notes

https://www.boost.org/index.html

Hierarchical URL with https protocol. Resource in the HTTP protocol.

ftp://host.dom/etc/motd

Hierarchical URL with ftp scheme. Resource in the FTP protocol.

urn:isbn:045145052

Opaque URL with urn scheme. Identifies isbn resource.

mailto:person@example.com

Opaque URL with mailto scheme. Identifies e-mail address.

index.html

URL reference. Missing scheme and host.

www.boost.org

A Protocol-Relative Link (PRL). Not a URL.


This library provides the following containers, which are capable of storing any possible URL:

These containers maintain a useful invariant: they always contain a valid URL.

Generic Syntax

This diagram shows the generic syntax which all URLs conform to:

In the sections that follow we discuss the main parts of the URL, parsing strings into the provided containers, modifying parts of the container while preserving invariants, and how to invoke common algorithms used with URLs.


PrevUpHomeNext