Uri.Parts
Uri.Parts(absoluteUri as text) as record
返回输入 absoluteUri
的组成部分作为记录,包含诸如方案、主机、端口、路径、查询、片段、用户名和密码等此类值。
示例:
查找绝对 URI "www.adventure-works.com" 的组成部分。
使用情况:
Uri.Parts("www.adventure-works.com")
输出:
[ Scheme = "http",
Host = "www.adventure-works.com",
Port = 80,
Path = "/",
Query = [],
Fragment = "",
UserName = "",
Password = "" ]
示例:
解码百分比编码字符串。
使用情况:
let
UriUnescapeDataString = (data as text) as text => Uri.Parts("http://contoso?a=" & data)[Query][a]
in
UriUnescapeDataString("%2Bmoney%24")
输出:
"+money$"