Reputation: 193
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
Upvotes: 1
Views: 1030
Reputation: 144136
let getBlogId uriString =
let uri = System.Uri(uriString)
let kvps = HttpUtility.ParseQueryString uri.Query
let idStr = kvps.["blogid"]
int idStr
Upvotes: 3
Reputation: 7852
let uri = new System.Uri("http://www.example.com/blog?blogid=23")
let blogId = uri.Query.Split('=').[1]
Upvotes: -1