[2019-06] [System.Net.Http]: Add hack to the legacy HttpClient to pass down Timeout...
commitc15b300298e268b40a273751c039f74bde2b279f
authormonojenkins <jo.shields+jenkins@xamarin.com>
Fri, 14 Jun 2019 08:51:02 +0000 (14 04:51 -0400)
committerMarek Safar <marek.safar@gmail.com>
Fri, 14 Jun 2019 08:51:02 +0000 (14 10:51 +0200)
treeb7ef31419dd8fd8c71699922f24746cf6c937311
parent6752005e6457adb467c0171782bc63f3557e04bd
[2019-06] [System.Net.Http]: Add hack to the legacy HttpClient to pass down Timeout property. #12577. (#15014)

* [System.Net.Http]Add hack to the legacy HttpClient to pass down Timeout property. #12577.

* `HttpClientHandler`, `IMonoHttpClientHandler`: add new internal `MonoSetTimeout (TimeSpan)` function.

* `HttpClient.SendAsyncWorker()`: if `handler` is `HttpClientHandler`, call the new internal
  `MonoSetTimeout()` function to pass down the timeout.

* `MonoWebRequestHandler.SendAsync()`: this is only used here to pass the timeout to the `HttpWebRequest`.

* Address feedback.

* Update HttpMessageInvoker.cs

* Make it build.

* Really make it build (forgot monotouch_watch).
mcs/class/System.Net.Http/HttpClientHandler.cs
mcs/class/System.Net.Http/IMonoHttpClientHandler.cs
mcs/class/System.Net.Http/MonoWebRequestHandler.cs
mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs
mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.platformnotsupported.cs
mcs/class/System.Net.Http/System.Net.Http/HttpMessageInvoker.cs
mcs/class/System.Net.Http/corefx/SocketsHttpHandler.Mono.cs