I am trying to make a GET http request with period in url
ex http://testsite.com/TestEndpoint/Members/first%2Elast%40testemail%2Ecom
in above example first.last@testemail.com is escaped to first%2Elast%40testemail%2Ecom
The problem is HttpClient creates a Uri from the string which unescapes the %2E to . (part of the url turns to first.last%40testmail.com) which causes public API to throw endpoint not found error.
I can make this request from Postman and it works just fine but from .net HttpClient or WebRequest.Create fails.
Is there a way to tell HttpClient not to un-escape the url?
var uri = new Uri("http://testsite.com/TestEndpoint/Members/first%2Elast%40testemail%2Ecom");
I also tried Creating an Uri in .NET automatically urldecodes all parameters from passed string
but that has no effect, not sure if that feature is broken or no longer supported.