Skip to main content

AnyUrl

Base type for all URLs.

* Any scheme allowed
* Top-level domain (TLD) not required
* Host not required

Assuming an input URL of `http://samuel:pass@example.com:8000/the/path/?query=here#fragment=is;this=bit`,
the types export the following properties:

- `scheme`: the URL scheme (`http`), always set.
- `host`: the URL host (`example.com`).
- `username`: optional username if included (`samuel`).
- `password`: optional password if included (`pass`).
- `port`: optional port (`8000`).
- `path`: optional path (`/the/path/`).
- `query`: optional URL query (for example, `GET` arguments or "search string", such as `query=here`).
- `fragment`: optional fragment (`fragment=is;this=bit`).

Attributes

AttributeTypeDescription
schemestringthe URL scheme (http), always set.
hoststringthe URL host (example.com).
usernamestringoptional username if included (samuel).
passwordstringoptional password if included (pass).
portstringoptional port (8000).
pathstringoptional path (/the/path/).
querystringoptional URL query (for example, GET arguments or "search string", such as query=here).
fragmentstringoptional fragment (fragment=is;this=bit).

Constructor

Signature

def AnyUrl()

Signature

def AnyUrl(
url: string
) - > null

Parameters

NameTypeDescription
urlstringThe raw URL string to be parsed into its constituent components like scheme, host, and path