Last active
May 30, 2021 21:14
-
-
Save MelbourneDeveloper/1107f17955aafb607d313319547f449a to your computer and use it in GitHub Desktop.
F# Url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<TestMethod>] | |
member this.TestComposition () = | |
let uri = | |
"host.com".ToHttpUrlFromHost(5000) | |
.AddQueryParameter("fieldname1", "field<>Value1") | |
.WithCredentials("username", "password") | |
.AddQueryParameter("FieldName2", "field<>Value2") | |
.WithFragment("frag") | |
.WithPath("pathpart1", "pathpart2") | |
Assert.AreEqual("http://username:password@host.com:5000/pathpart1/pathpart2?fieldname1=field%3C%3EValue1&FieldName2=field%3C%3EValue2#frag",uri.ToString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment