Search code examples
f#websharper

How to get URL and its parameter value in F#


Is there any way to get URL and further its parameter values in f# Only F# any one can help me. I have tried a lot but no solution found

http://www.example.com/blog?blogid=23

Want to get http://www.example.com/blog?blogid=23

Then 23


Solution

  • let uri = new System.Uri("http://www.example.com/blog?blogid=23")
    let blogId = uri.Query.Split('=').[1]