From: Rolf Bjarne Kvinge Date: Mon, 3 Oct 2016 16:21:40 +0000 (+0200) Subject: [System.Net.Http] Simplify default http message handler for watchOS since there's... X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=0c6036bcdf3d239390d3db6610ec95f5bc4e24f0 [System.Net.Http] Simplify default http message handler for watchOS since there's only one valid value. --- 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