Net4x.Net.HttpClient
1.0.0
dotnet add package Net4x.Net.HttpClient --version 1.0.0
NuGet\Install-Package Net4x.Net.HttpClient -Version 1.0.0
<PackageReference Include="Net4x.Net.HttpClient" Version="1.0.0" />
<PackageVersion Include="Net4x.Net.HttpClient" Version="1.0.0" />
<PackageReference Include="Net4x.Net.HttpClient" />
paket add Net4x.Net.HttpClient --version 1.0.0
#r "nuget: Net4x.Net.HttpClient, 1.0.0"
#:package Net4x.Net.HttpClient@1.0.0
#addin nuget:?package=Net4x.Net.HttpClient&version=1.0.0
#tool nuget:?package=Net4x.Net.HttpClient&version=1.0.0
Net4x.Net.HttpClient
A portable/backported implementation of System.Net.Http APIs intended for use on older .NET Framework targets and .NET Standard 2.0 projects. This project provides HttpClient, content types, headers parsing helpers, and related types for environments that lack a modern System.Net.Http implementation.
Supported targets
- .NET Framework 2.0
- .NET Framework 4.0
- .NET Framework 4.5
- .NET Standard 2.0
Key features
HttpClientandHttpClientHandlerimplementationsHttpContentsubclasses:StringContent,ByteArrayContent,StreamContent,MultipartContent,MultipartFormDataContent- Header parsing and helper types under
System.Net.Http.Headers - Backwards-compatible design for older frameworks
Installation
This repository is distributed as source. You can add the project to your solution and reference it from projects that target the supported frameworks.
Usage example
Basic HttpClient usage:
using System.Net.Http;
using System.Threading.Tasks;
public async Task<string> GetAsync(string url)
{
using (var client = new HttpClient())
{
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
return await response.Content.ReadAsStringAsync();
}
}
Notes
- Behavior aims to be compatible with the
System.Net.HttpAPI surface, but subtle differences may exist depending on target framework limitations. - For modern .NET projects prefer the platform
System.Net.Httppackage when available.
Building
- Open the solution in Visual Studio and build the
Net4x.Net.HttpClientproject. - The project contains multi-targeting variants for older .NET Framework versions and .NET Standard 2.0.
Testing
- No automated tests are included in this repository by default. Add tests targeting the frameworks you need and reference the project.
Contributing
Contributions are welcome. Please open issues for bugs or feature requests and supply small, focused pull requests.
License
This project is available under the license in LICENSE.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net20 is compatible. net35 was computed. net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 2.0
- Net35.TypeInfo (>= 1.5.0.6)
- Net4x.AsyncBridge (>= 1.5.0.7)
- Net4x.BaseTypes (>= 1.3.1.13)
-
.NETFramework 4.0
- Microsoft.Net.Http (>= 2.2.29)
- Net4x.AsyncBridge (>= 1.5.0.7)
- Net4x.BaseTypes (>= 1.3.1.13)
-
.NETFramework 4.5
- Microsoft.Net.Http (>= 2.2.29)
- Net4x.AsyncBridge (>= 1.5.0.7)
- Net4x.BaseTypes (>= 1.3.1.13)
-
.NETStandard 2.0
- Net4x.AsyncBridge (>= 1.5.0.7)
- Net4x.BaseTypes (>= 1.3.1.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 94 | 12/30/2025 |