I'm trying to get public profile information from LinkedIn. To achieve this I have to provide
http://api.linkedin.com/v1/people/url=public-profile-url, where public-profile-url MUST be URL encoded.
The issue is that .NET classes such as HttpClient, WebRequest etc use Uri class which seems to "canonize" the provided URL, so that I can't get the proper formatted request sent.
The URI must be:
http://api.linkedin.com/v1/people/url=http%3a%2f%2fwww.linkedin.com%2fin%2fiftachragoler
but is:
http://api.linkedin.com/v1/people/url=http://www.linkedin.com/in/iftachragoler
In this way, I get 'Bad Request' from LinkedIn.
Is there any way I can have Uri/UriBuilder not to decode that URL?