Table of contents
TOC
Collapse the table of content
Expand the table of content

Uri.Parts

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Returns a record value with the fields set to the parts of a Uri text value.

Uri.Parts(absoluteUri as text) as [Scheme = text, Host = text, Port = number, Path = text, Query = record, Fragment = text, UserName = text, Password = text]  

Arguments

ArgumentDescription
absoluteUriThe absolute Uri.

Example 1

Uri.Parts("http://www.microsoft.com")   
equals [  
Scheme = "http",  
Host = "www.microsoft.com",  
Port = 80,  
Path = "/",  
Query = [],  
Fragment = "",  
UserName = "",  
Password = ""  
]  

Example 2

Decode a percent-encoded string.

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