Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Bjarne Kvinge <rolf@xamarin.com>2016-10-03 19:21:40 +0300
committerRolf Bjarne Kvinge <rolf@xamarin.com>2016-10-03 19:22:12 +0300
commit0c6036bcdf3d239390d3db6610ec95f5bc4e24f0 (patch)
tree3d14a43c3cd7ebbd8442d164c493d8edb3a39c04 /mcs/class/System.Net.Http
parent993f805cb7f9c6d1887cfadddfc69377443452d7 (diff)
[System.Net.Http] Simplify default http message handler for watchOS since there's only one valid value.
Diffstat (limited to 'mcs/class/System.Net.Http')
-rw-r--r--mcs/class/System.Net.Http/HttpClientEx.cs5
1 files changed, 5 insertions, 0 deletions
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