Skip to main content

$$uriparse

Parses a URI to its components

Usage​

{ 
"$$uriparse": /* A URI formatted string */
}
"$$uriparse:{input}"

Returns​

object

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimarystringYesA URI formatted string

Examples​

Input

Definition

Output

"https://user:pass@example.com:9090/whatever/?q=a&q=b#fragment"
"$$uriparse:$"
{
"scheme": "https",
"user_info": "user:pass",
"authority": "user:pass@example.com:9090",
"host": "example.com:9090",
"hostname": "example.com",
"port": 9090,
"path": "/whatever/",
"query": {
"q": "a",
"q$$": [
"a",
"b"
]
},
"query_raw": "q=a&q=b",
"fragment": "fragment"
}
"https://example.com/whatever"
"$$uriparse:$"
{
"scheme": "https",
"authority": "example.com",
"host": "example.com",
"hostname": "example.com",
"path": "/whatever"
}
"<https///>"
"$$uriparse:$"
null