Uri.Parts
This function extracts different components of the provided absoluteUri and organizes them into a structured record. This record includes details such as Scheme, Host, Port, Path, Query, Fragment, Use...
This function extracts different components of the provided absoluteUri and organizes them into a structured record. This record includes details such as Scheme, Host, Port, Path, Query, Fragment, UserName, and Password.
Example 1
Locate the components of the absolute URI "www.adventure-works.com" using Power Query M function Uri.Parts("www.adventure-works.com").
Output:
[ Scheme = "http",
Host = "www.adventure-works.com",
Port = 80,
Path = "/",
Query = [],
Fragment = "",
UserName = "",
Password = ""]
Example 2
Perform decoding of a percent-encoded string utilizing Power Query M function.
Define UriUnescapeDataString = (data as text) as text => Uri.Parts("http://contoso?a=" & data)[Query][a]
Apply UriUnescapeDataString("%2Bmoney%24")
Output: "+money$"