URL

A Unique Resource Locator.

URLs can be parsed (see parseURL) and implicitly convert to strings.

Alias This

toString

Implicitly convert URLs to strings.

Members

Functions

opBinary
URL opBinary(string subsequentPath)

The append operator (~).

opOpAssign
URL opOpAssign(string subsequentPath)

The append-in-place operator (~=).

toHumanReadableString
string toHumanReadableString()

Convert this URL to a string. The string is intended to be human-readable rather than machine-readable.

toString
string toString()

Convert this URL to a string. The string is properly formatted and usable for, eg, a web request.

Properties

port
ushort port [@property getter]

The port.

port
ushort port [@property setter]

Set the port.

Variables

fragment
string fragment;

The fragment. In web documents, this typically refers to an anchor element. For instance, in the URL https://cnn.com/news/story/17774#header2, the fragment is "header2".

host
string host;

The hostname.

pass
string pass;

The password in this URL. Usually absent.

path
string path;

The path.

providedPort
ushort providedPort;

The port that was explicitly provided in the URL.

query
string[string] query;
queryParams
QueryParams queryParams;

The query parameters associated with this URL.

scheme
string scheme;

The URL scheme. For instance, ssh, ftp, or https.

user
string user;

The username in this URL. Usually absent. If present, there will also be a password.

Meta