So I'm doing a GET to my fancy new WebAPI, and one of my parameters is a URL that I escape using encodeURIComponent. In fiddler, the request looks like
GET /api/myapi/myurl/https%3A%2F%2Ft.co%2FkIEnlT8Mvn HTTP/1.1
so that's good.
However, if I look at the request in my Application_BeginRequest, I get
?HttpContext.Current.Request.Url.AbsolutePath
"/api/myapi/myurl/https:/t.co/kIEnlT8Mvn"
?HttpContext.Current.Request.Url.AbsoluteUri
"http://localhost:23652/api/myapi/myurl/https:/t.co/kIEnlT8Mvn"
?HttpContext.Current.Request.Url.OriginalString
"http://localhost:23652/api/myapi/myurl/https:/t.co/kIEnlT8Mvn"
?Request.RawUrl
"/api/myapi/myurl/https:/t.co/kIEnlT8Mvn"
So my question is: How can I get the correct URL out of what is sent from the client? I want to get either
A good URL https:SlashSlasht.co/kIEnlT8Mvn (the // changed because SO hates short URLs)
or
https%3A%2F%2Ft.co%2FkIEnlT8Mvn
not https:/t.co/kIEnlT8Mvn
(I've also tried encoding the URL with escape() and encodeURL(), with the same results.)