IHttpClient 0.0.6
See the version list below for details.
dotnet add package IHttpClient --version 0.0.6
NuGet\Install-Package IHttpClient -Version 0.0.6
<PackageReference Include="IHttpClient" Version="0.0.6" />
<PackageVersion Include="IHttpClient" Version="0.0.6" />
<PackageReference Include="IHttpClient" />
paket add IHttpClient --version 0.0.6
#r "nuget: IHttpClient, 0.0.6"
#:package IHttpClient@0.0.6
#addin nuget:?package=IHttpClient&version=0.0.6
#tool nuget:?package=IHttpClient&version=0.0.6
Info
This project uses source generation to generate an IHttpClient
interface and HttpClientProxy
from the HttpClient
to make it injectable and unit-testable.
All the methods and properties from the HttpClient
are replicated to IHttpClient
.
Usage
HttpClient httpClient = new HttpClient();
IHttpClient httpClientProxy = new HttpClientProxy(httpClient);
var result = await httpClientProxy.GetAsync("https://www.google.nl");
var todo = await httpClientProxy.GetFromJsonAsync<Todo>("https://jsonplaceholder.typicode.com/todos/1");
var postResult = await httpClientProxy.PostAsJsonAsync("https://jsonplaceholder.typicode.com/todos", new Todo { Id = 123 });
var patchResult = await httpClientProxy.PatchAsJsonAsync("https://jsonplaceholder.typicode.com/todos/1", new Todo { Id = 400 });
var putResult = await httpClientProxy.PutAsJsonAsync("https://jsonplaceholder.typicode.com/todos/1", new Todo { Id = 444 });
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 is compatible. 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net461 is compatible. 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 | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- StringSyntaxPolyfill (>= 1.1.0)
- System.Net.Http.Json (>= 6.0.0)
-
.NETStandard 2.1
- StringSyntaxPolyfill (>= 1.1.0)
- System.Net.Http.Json (>= 6.0.0)
-
net6.0
- StringSyntaxPolyfill (>= 1.1.0)
- System.Net.Http.Json (>= 6.0.0)
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on IHttpClient:
Package | Downloads |
---|---|
Blazor.BrowserExtension.Authentication.Microsoft
This package adds Microsoft Authentication to a Blazor.BrowserExtension using chrome.identity.launchWebAuthFlow functionality. |
GitHub repositories
This package is not used by any popular GitHub repositories.
# 0.0.6 (07 January 2025)
- #5 Update ProxyInterfaceGenerator to version 0.5.0 [enhancement]
The full release notes can be found here: https://github.com/StefH/IHttpClient/blob/main/ReleaseNotes.md