Polhem.JsonRpc.Client
1.1.0
dotnet add package Polhem.JsonRpc.Client --version 1.1.0
NuGet\Install-Package Polhem.JsonRpc.Client -Version 1.1.0
<PackageReference Include="Polhem.JsonRpc.Client" Version="1.1.0" />
<PackageVersion Include="Polhem.JsonRpc.Client" Version="1.1.0" />
<PackageReference Include="Polhem.JsonRpc.Client" />
paket add Polhem.JsonRpc.Client --version 1.1.0
#r "nuget: Polhem.JsonRpc.Client, 1.1.0"
#:package Polhem.JsonRpc.Client@1.1.0
#addin nuget:?package=Polhem.JsonRpc.Client&version=1.1.0
#tool nuget:?package=Polhem.JsonRpc.Client&version=1.1.0
Polhem.JsonRpc.Client
A JSON-RPC 2.0 client on System.Text.Json: calls, notifications and batches over HTTP, with interceptors for rewriting parameters and results. It supports trimming and Native AOT, so it runs on iOS, Android and WebAssembly.
using var http = new HttpClient { BaseAddress = new Uri("https://example.com/api") };
var rpc = new JsonRpcConnector(new HttpTransport(http));
var added = await rpc.InvokeAsync<AddResponse>("Calculator.Add", new AddRequest { A = 1, B = 2 });
An error answer is thrown as JsonRpcErrorException. Under Native AOT, set JsonRpcClientOptions.SerializerOptions
to options whose TypeInfoResolver is a source-generated JsonSerializerContext.
Documentation and samples: https://github.com/polhem-dev/polhem-jsonrpc
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Polhem.JsonRpc (>= 1.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Polhem.JsonRpc.Client:
| Package | Downloads |
|---|---|
|
Polhem.Api.Client
Connector for local or remote invocation of backend logic. |
GitHub repositories
This package is not used by any popular GitHub repositories.