dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.28k stars 954 forks source link

Use HttpClient in PictureBox #11544

Closed lonitra closed 1 week ago

lonitra commented 1 week ago

ServicePointManager and WebClient are obselete, but are being used in PictureBox https://github.com/dotnet/winforms/blob/520c319cb19375f96afeb79cf5af21b9e877d98c/src/System.Windows.Forms/src/System/Windows/Forms/Controls/PictureBox/PictureBox.cs#L500-L524

We needed to suppress SYSLIB0014 warning in https://github.com/dotnet/winforms/pull/11540 to unblock depdency flow, but we should update this code to use HttpClient

paul1956 commented 1 week ago

PR #11215 provides a webserver for testing HTTP client downloads.