Polhem.JsonRpc.Payload.Client 1.2.0

dotnet add package Polhem.JsonRpc.Payload.Client --version 1.2.0
                    
NuGet\Install-Package Polhem.JsonRpc.Payload.Client -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Polhem.JsonRpc.Payload.Client" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Polhem.JsonRpc.Payload.Client" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Polhem.JsonRpc.Payload.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Polhem.JsonRpc.Payload.Client --version 1.2.0
                    
#r "nuget: Polhem.JsonRpc.Payload.Client, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Polhem.JsonRpc.Payload.Client@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Polhem.JsonRpc.Payload.Client&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Polhem.JsonRpc.Payload.Client&version=1.2.0
                    
Install as a Cake Tool

Polhem.JsonRpc.Payload.Client

The client half of Polhem.JsonRpc.Payload: PayloadConnector seals the parameters of each call into the payload envelope (the codec, gzip, the replay-protection frame and the encryption) and opens its result, so an encrypted call is written exactly like a plain one with JsonRpcConnector. It supports trimming and Native AOT, so it runs on iOS, Android and WebAssembly.

var payload = new PayloadProcessor(new PayloadOptions { RequireFrame = true });
var rpc = new PayloadConnector(connector, payload, new PayloadConnectorOptions { KeyProvider = () => sessionKey });

var added = await rpc.InvokeAsync<AddResponse>("Calculator.Add", new AddRequest { A = 1, B = 2 });
var plain = await rpc.InvokeAsync<AddResponse>("Calculator.Add", new AddRequest { A = 3, B = 4 }, PayloadFormat.Plain, CancellationToken.None);

Calls are encrypted unless PayloadConnectorOptions.Format or the call names another format. The key is asked for on every encrypted call, so a key that changes after a sign-in is used from the next call; an encrypted call without a key fails, and is never sent in a lower format. Each call takes the next sequence number of the connector, or the number SequenceGenerator returns when the numbers must outlive it. The result is opened into the type the call asks for; InvokeAsync<object> resolves the type the envelope names, which must be registered with PayloadOptions.TypeResolver.

Documentation and samples: https://github.com/polhem-dev/polhem-jsonrpc

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Polhem.JsonRpc.Payload.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.

Version Downloads Last Updated
1.2.0 0 10/5/2026