Implement HttpClient.DefaultProxy property (dotnet/corefx#37333)
authorDavid Shulman <david.shulman@microsoft.com>
Wed, 1 May 2019 22:17:21 +0000 (15:17 -0700)
committerGitHub <noreply@github.com>
Wed, 1 May 2019 22:17:21 +0000 (15:17 -0700)
commit5ef49c6883d64e36731065dfb77cf031f3908ea7
treeafc198174a242f4c5c40f50c09206851cfb7400a
parent3c80118cf07261d8939f9afe4d1453891d977772
Implement HttpClient.DefaultProxy property (dotnet/corefx#37333)

This PR implements the new static HttpClient.DefaultProxy property which was approved
during API review.

Modify the SystemProxyInfo.ConstructSystemProxy method to a Singleton.

Modify SocketsHttpHandler to use the HttpClient.DefaultProxy property.

Rename the HttpSystemProxy class to HttpWindowsProxy.

Add some HttpClient tests for the new property.

Closes dotnet/corefx#36553

Commit migrated from https://github.com/dotnet/corefx/commit/c661db6ce2da91033671c0000afc185de1ad3fe9
15 files changed:
src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpWindowsProxyTest.cs [moved from src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs with 88% similarity]
src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj
src/libraries/System.Net.Http/ref/System.Net.Http.cs
src/libraries/System.Net.Http/src/System.Net.Http.csproj
src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs [moved from src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs with 98% similarity]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.cs [new file with mode: 0644]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.uap.cs [new file with mode: 0644]
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs
src/libraries/System.Net.Http/tests/UnitTests/HttpWindowsProxyTest.cs [moved from src/libraries/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs with 89% similarity]
src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj