Reference

std/uri

Uniform Resource Identifiers as values: Uri and UriReference after RFC 3986, read and normalized at construction, so ==, hash() and compare() are over the canonical form; IRIs (RFC 3987) read as the URI they stand for and shown back by iriText(); Urn after RFC 8141; UriTemplate after RFC 6570, typed against the fields it fills, and the routes of TemplateRoutes built from it; the file: bridge to Path after RFC 8089; and the application/x-www-form-urlencoded codec of HTML forms. Schemes is what a driver of a scheme says it answers to, which a registry of drivers dispatches on (std/storage).

A string literal where a Uri, a UriReference or a UriTemplate is expected is read by the compiler where it is written, and one that is none is an error at that line (docs/design/URI.md section 9).

Nothing in std/uri touches anything - no network, no file system, no capability. An IP literal host is an address of std/ip, and resolving a name or opening a connection is std/network's. Uri and UriError are in the prelude; everything else is an import (docs/design/URI.md).

const base: Uri = "https://example.test/guide/start.html"
const link: UriReference = "../reference/index.html#top"
print link.resolved(against: base)

Modules

Everything