Created
March 24, 2024 06:24
-
-
Save sheepla/45029de5b99ad2b3f39711e77806d594 to your computer and use it in GitHub Desktop.
BuildURL.fs
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
let url = | |
let builder = new UriBuilder("https://www.example.com") | |
// let values = HttpUtility.ParseQueryString(builder.Query) | |
builder.Query <- | |
set [("key1", "value1"); ("key2", "value2")] | |
|> Set.map (fun (k, v) -> sprintf "%s=%s" <| Uri.EscapeDataString(k) <| Uri.EscapeDataString(v)) | |
|> String.concat "&" | |
builder.ToString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment