Xamarin developers have a spectrum of choices when it comes to their HTTPS clients, these are the options available today:
WebClient, the original .NET HTTP API that provides support for HTTP and HTTPS, highly configurable, but difficult to use.
HttpClient: this is an abstraction of the HTTP stack, and by default, this uses
HttpWebRequest, but you can use any provider you want.
* Pros and Cons depend on which provider you use. If you use
HttpWebRequest, you get the pros and cons of it, if you use another provider, those would apply.
ModernHttpClient: this is a provider developed by Paul Betts and available as a component. It provides an
HttpClient interface that is backed on iOS by the operating system's
NSURLSession, so you get background downloads for free, HTTP 2.0, and support for the latest TLS implementation; On Android you get support for HTTP 2.0 and the latest TLS implementation
HttpClient-based APIs are not as configurable as
We strongly recommend the use of
ModernHttpClient, we like it so much that we are going to be switching our default
HttpClient transport in the future to use the
ModernHttpClient provider on iOS and build a native provider for Android to go along with it.