From 0c6036bcdf3d239390d3db6610ec95f5bc4e24f0 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 3 Oct 2016 18:21:40 +0200 Subject: [PATCH] [System.Net.Http] Simplify default http message handler for watchOS since there's only one valid value. --- mcs/class/System.Net.Http/HttpClientEx.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mcs/class/System.Net.Http/HttpClientEx.cs b/mcs/class/System.Net.Http/HttpClientEx.cs index 59456d6df0b..14ebd8ff85d 100644 --- a/mcs/class/System.Net.Http/HttpClientEx.cs +++ b/mcs/class/System.Net.Http/HttpClientEx.cs @@ -29,7 +29,12 @@ namespace System.Net.Http { // but we want this to work "as expected" even if the application is not being linked static HttpMessageHandler GetDefaultHandler () { +#if MONOTOUCH_WATCH + // There's only one valid handler type for watchOS + return new NSUrlSessionHandler (); +#else return RuntimeOptions.GetHttpMessageHandler (); +#endif } } #else -- 2.25.1