Hop til hovedindhold

Uri.Parts

Returnerer delene i den absolutte URI for input som en post.

Syntax

Uri.Parts(
absoluteUri as text
) as record

Remarks

Returnerer delene af absoluteUri for input som en post, der indeholder værdier, f.eks. Scheme, Host, Port, Path, Query, Fragment, UserName og Password.

Examples

Example #1

Find delene i den absolutte URI for input "www.adventure-works.com".

Uri.Parts("www.adventure-works.com")

Result:

[
Scheme = "http",
Host = "www.adventure-works.com",
Port = 80,
Path = "/",
Query = [],
Fragment = "",
UserName = "",
Password = ""
]

Example #2

Afkod en procentkodet streng.

let
UriUnescapeDataString = (data as text) as text => Uri.Parts("http://contoso?a=" & data)[Query][a]
in
UriUnescapeDataString("%2Bmoney%24")

Result:

"+money$"

Category

Uri