I am seeing a lot of Exceptions in HttpClient, both on iOS and on Android.
The easiest way to reproduce them is by doing more than one postAsync at the same time.
It will almost all the time trigger a ProtocolViolationException about an invalid content-length.
Doing more async-calls than the limit in ServicePointManager.DefaultConnectionLimit is also a recipe for Exceptions:
System.InvalidOperationException: Cannot re-call start of asynchronous method while a previous call is still in progress.
System.Threading.Tasks.TaskCanceledException: The Task was canceled
From my understanding HttpClient should be able to handle multiple requests at the same time. I read everywhere that is is advisable to have one HttpClient in your project (at least one per webserver/service).
Am i using the HttpClient correctly in this testproject?
There was already a bug filed for this, i added a comment with the project to reproduce it.
See also https://bugzilla.xamarin.com/show_bug.cgi?id=23957