Uri.Parts

Sintaxe

Uri.Parts(absoluteUri as text) as record

Sobre

Retorna as partes do absoluteUri de entrada como um registro, contendo valores como Scheme, Host, Port, Path, Query, Fragment, UserName e Password.

Exemplo 1

Localize as partes do URI absoluto "www.adventure-works.com".

Usage

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

Saída

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

Exemplo 2

Decodifique uma cadeia de caracteres codificada por percentual.

Usage

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

Saída

"+money$"