Skip to content

Commit

Permalink
Merge pull request mono#3693 from rolfbjarne/watchos-simplify-http-me…
Browse files Browse the repository at this point in the history
…ssage-handler-selection

[System.Net.Http] Simplify default http message handler for watchOS since there's only one valid value.
  • Loading branch information
akoeplinger authored Oct 4, 2016
2 parents 9ca4e13 + 0c6036b commit f16c086
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mcs/class/System.Net.Http/HttpClientEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ public HttpClient ()
// 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
Expand Down

0 comments on commit f16c086

Please sign in to comment.