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
| Attribute | Type | Description |
|---|---|---|
| scheme | string | the URL scheme (http), always set. |
| host | string | the URL host (example.com). |
| username | string | optional username if included (samuel). |
| password | string | optional password if included (pass). |
| port | string | optional port (8000). |
| path | string | optional path (/the/path/). |
| query | string | optional URL query (for example, GET arguments or "search string", such as query=here). |
| fragment | string | optional fragment (fragment=is;this=bit). |
Constructor
Signature
def AnyUrl()
Signature
def AnyUrl(
url: string
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| url | string | The raw URL string to be parsed into its constituent components like scheme, host, and path |