title | description | ms.reviewer | ms.topic | ms.date |
---|---|---|---|---|
parse_url() |
Learn how to use the parse_url() function to parse a URL string. |
alexans |
reference |
01/12/2023 |
Parses an absolute URL string
and returns a dynamic
object contains URL parts.
Deprecated aliases: parseurl()
parse_url(
url)
[!INCLUDE syntax-conventions-note]
Name | Type | Required | Description |
---|---|---|---|
url | string |
✔️ | An absolute URL, including its scheme, or the query part of the URL. For example, use the absolute https://bing.com instead of bing.com . |
An object of type dynamic that included the URL components: Scheme, Host, Port, Path, Username, Password, Query Parameters, Fragment.
[!div class="nextstepaction"] Run the query
print Result=parse_url("scheme://username:password@host:1234/this/is/a/path?k1=v1&k2=v2#fragment")
Output
Result |
---|
{"Scheme":"scheme", "Host":"host", "Port":"1234", "Path":"this/is/a/path", "Username":"username", "Password":"password", "Query Parameters":"{"k1":"v1", "k2":"v2"}", "Fragment":"fragment"} |