Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The following breaking changes are documented on this page:
Breaking change | Introduced version |
---|---|
Default value of HttpRequestMessage.Version changed to 1.1 | 3.0 |
WebClient.CancelAsync doesn't always cancel immediately | 2.0 |
The default value of the System.Net.Http.HttpRequestMessage.Version property has changed from 2.0 to 1.1.
3.0
In .NET Core 1.0 through 2.0, the default value of the System.Net.Http.HttpRequestMessage.Version property is 1.1. Starting with .NET Core 2.1, it was changed to 2.1.
Starting with .NET Core 3.0, the default version number returned by the System.Net.Http.HttpRequestMessage.Version property is once again 1.1.
Update your code if it depends on the System.Net.Http.HttpRequestMessage.Version property returning a default value of 2.0.
Networking
Starting in .NET Core 2.0, calling WebClient.CancelAsync() doesn't cancel the request immediately if the response has started to fetch.
Previously, calling WebClient.CancelAsync() canceled the request immediately. Starting in .NET Core 2.0, calling WebClient.CancelAsync() cancels the request immediately only if the response hasn't started fetching. If the response has started to fetch, the request is cancelled only after a complete response is read.
This change was implemented because the WebClient API is deprecated in favor of HttpClient.
2.0
Use the System.Net.Http.HttpClient class instead of System.Net.WebClient, which is deprecated.
Networking
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Consume REST web services in .NET MAUI apps - Training
Consume a REST web service by using HttpClient and perform basic CRUD operations. You'll detect when your device is connected to the internet to provide a good user experience and take advantage of the native networking stacks to get top performance.