Struct URL
Represents a URL decomposed into its components.
struct URL
;
Constructors
Name | Description |
---|---|
this
(schema, host, port, path)
|
Constructs a new URL object from its components. |
this
(path)
|
Constructs a "file:" URL from a native file system path. |
this
(url_string)
|
Constructs a URL from its string representation. |
Properties
Name | Type | Description |
---|---|---|
anchor [get]
|
string | The anchor part of the URL (optional) |
host [get, set]
|
string | The host part of the URL (depends on the schema) |
localURI [get, set]
|
string | The path part plus query string and anchor |
parentURL [get]
|
URL | The URL to the parent path with query string and anchor stripped. |
password [get, set]
|
string | The password part of the URL (optional) |
path [get, set]
|
GenericPath!(vibe.core.path.InetPathFormat) | The path part of the URL |
pathString [get]
|
string | The url encoded path part of the URL |
pathString [set]
|
string | Set the path part of the URL. It should be properly encoded. |
port [get, set]
|
ushort | The port part of the URL (optional) |
queryString [get, set]
|
string | The query string part of the URL (optional) |
schema [get, set]
|
string | The schema/protocol part of the URL |
username [get, set]
|
string | The user name part of the URL (optional) |
Methods
Name | Description |
---|---|
defaultPort
(schema)
|
Get the default port for the given schema or 0 |
fromString
(url_string)
|
Constructs a URL from its string representation. |
opBinary
(rhs)
|
|
opBinary
(rhs)
|
|
opCmp
(rhs)
|
|
opEquals
(rhs)
|
Tests two URLs for equality using '=='. |
opOpAssign
(rhs)
|
|
opOpAssign
(rhs)
|
|
parse
(url_string)
|
Constructs a URL from its string representation. |
startsWith
(rhs)
|
|
toNativePath
()
|
Converts a "file" URL back to a native file system path. |
toString
()
|
Converts this URL object to its string representation. |