Skip to content

Instantly share code, notes, and snippets.

@MelbourneDeveloper
Last active May 30, 2021 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MelbourneDeveloper/1107f17955aafb607d313319547f449a to your computer and use it in GitHub Desktop.
Save MelbourneDeveloper/1107f17955aafb607d313319547f449a to your computer and use it in GitHub Desktop.
F# Url
[<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