I need to connect to an API where the services URLs are case sensitive. For example, https://api-ABC.domain.com
is different from https://api-abc.domain.com
.
However, every time I create a new Uri
object in C#, it converts the link to all lower case.
Here is my code:
var client = _httpClientFactory.CreateClient();
client.BaseAddress = new Uri($"https://api-{caseSensitiveAppId}.domain.com/v2/", UriKind.Absolute);
How can I create a Uri
object that is case sensitive?