File tree Expand file tree Collapse file tree 10 files changed +19
-2
lines changed
Controls/tests/TestCases.HostApp Expand file tree Collapse file tree 10 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1
1
using System . Reflection ;
2
+ using Microsoft . Maui . Platform ;
2
3
3
4
namespace Maui . Controls . Sample
4
5
{
@@ -18,7 +19,7 @@ void CheckInternetAndLoadPage(Type type)
18
19
{
19
20
try
20
21
{
21
- using ( var httpClient = new HttpClient ( ) )
22
+ using ( var httpClient = HttpClientUtilities . CreateHttpClient ( ) )
22
23
{
23
24
httpClient . Timeout = TimeSpan . FromSeconds ( 5 ) ;
24
25
using ( var httpResponse = httpClient . GetAsync ( @"https://www.github.com" , HttpCompletionOption . ResponseHeadersRead ) )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace Microsoft.Maui.Platform
8
8
/// Utilities for creating HttpClient instances with proper SSL certificate handling.
9
9
/// Based on fix from dotnet/android for certificate revocation check failures.
10
10
/// </summary>
11
- internal static class HttpClientUtilities
11
+ public static class HttpClientUtilities
12
12
{
13
13
/// <summary>
14
14
/// Creates an HttpClient with proper SSL certificate revocation handling to avoid
Original file line number Diff line number Diff line change @@ -3363,3 +3363,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
3363
3363
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
3364
3364
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
3365
3365
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
3366
+ Microsoft.Maui.Platform.HttpClientUtilities
3367
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
Original file line number Diff line number Diff line change @@ -3293,3 +3293,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
3293
3293
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
3294
3294
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
3295
3295
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
3296
+ Microsoft.Maui.Platform.HttpClientUtilities
3297
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
Original file line number Diff line number Diff line change @@ -3293,3 +3293,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
3293
3293
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
3294
3294
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
3295
3295
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
3296
+ Microsoft.Maui.Platform.HttpClientUtilities
3297
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
Original file line number Diff line number Diff line change @@ -3055,3 +3055,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
3055
3055
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
3056
3056
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
3057
3057
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
3058
+ Microsoft.Maui.Platform.HttpClientUtilities
3059
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
Original file line number Diff line number Diff line change @@ -3170,3 +3170,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
3170
3170
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
3171
3171
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
3172
3172
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
3173
+ Microsoft.Maui.Platform.HttpClientUtilities
3174
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
Original file line number Diff line number Diff line change @@ -2566,3 +2566,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
2566
2566
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
2567
2567
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
2568
2568
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
2569
+ Microsoft.Maui.Platform.HttpClientUtilities
2570
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
Original file line number Diff line number Diff line change @@ -2566,3 +2566,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
2566
2566
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
2567
2567
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
2568
2568
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
2569
+ Microsoft.Maui.Platform.HttpClientUtilities
2570
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
Original file line number Diff line number Diff line change @@ -2564,3 +2564,5 @@ virtual Microsoft.Maui.WindowOverlay.HandleUIChange() -> void
2564
2564
virtual Microsoft.Maui.WindowOverlay.Initialize() -> bool
2565
2565
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElement(Microsoft.Maui.IWindowOverlayElement! drawable) -> bool
2566
2566
virtual Microsoft.Maui.WindowOverlay.RemoveWindowElements() -> void
2567
+ Microsoft.Maui.Platform.HttpClientUtilities
2568
+ static Microsoft.Maui.Platform.HttpClientUtilities.CreateHttpClient() -> System.Net.Http.HttpClient!
You can’t perform that action at this time.
0 commit comments