Skip to content

ModernHttpClient 1.0

Compare
Choose a tag to compare
@anaisbetts anaisbetts released this 31 Oct 06:43
· 252 commits to master since this release

What's New

Cancellation and Headers

ModernHttpClient now correctly handles cancellation, closing the underlying connection as soon as possible. To do this fully, you must both supply and cancel a CancellationToken, and should you receive an HttpResponseMessage, you must Dispose the Content of the message.

Both iOS and Android also now correctly support HttpCompletionOption.ResponseHeadersRead, meaning that HttpClient will return as soon as headers are available, which means you can cancel a request based on the header content (i.e. if you determine that the request is not actually needed, you can Dispose the Content and close the underlying socket connection).

Other Bug Fixes

  • Build fixes and Xamarin Component support thanks to @pupitetris!
  • For reals support Gingerbread and higher on Android