.NET Framework 4.6.2 seems to have the System.Net.Http assembly/namespace built in. There is also a Nuget package of the same name that I can install.
As a general principal, can a Nuget package replace (e.g. update) an assembly that is included in the installed framework?
And specifically, should I use the Nuget version or the framework version of System.Net.Http?
The System. Net. Http namespace is designed to provide the following: HTTP client components that allow users to consume modern web services over HTTP.
The old System. Net. Http packages (the 2.0 ones) are legacy packages which are deprecated in favor of Microsoft.Http.Net according to the description: Legacy package, System.
NuGet doesn't manage trust. Even if it did, you would still have to be concerned about trusting what NuGet trusts. You should absolutely be concerned about the safety of the code in a NuGet package. You should be concerned about the safety of any code you are not familiar with.
The latest version of System. Net. Http on nuget is 4.3.
Definition. Namespace: System.Net.Http Assembly: System.Net.Http.dll. Provides a class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
In general, you can replace the framework library with one from NuGet. I would recommend to do it if you have a specific reason to do it. For example, if you need a bug fix, a new API or leverage performance improvements.
Specifically, with System.Net.Http it depends on your scenario. If you are making 1000 http calls a minute, use the newest from the NuGet. If you are making 2 calls an hour and you are not facing any issue, stick with the framework version. Between these two numbers, it depends.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With