CommandQuery.Client 2.0.0

Install-Package CommandQuery.Client -Version 2.0.0
dotnet add package CommandQuery.Client --version 2.0.0
<PackageReference Include="CommandQuery.Client" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CommandQuery.Client --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CommandQuery.Client, 2.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install CommandQuery.Client as a Cake Addin
#addin nuget:?package=CommandQuery.Client&version=2.0.0

// Install CommandQuery.Client as a Cake Tool
#tool nuget:?package=CommandQuery.Client&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

CommandQuery.Client 🧰

build CodeFactor

Clients for CommandQuery

Commands

Create a CommandClient and invoke PostAsync:

var commandClient = new CommandClient("https://commandquery-sample-aspnetcore-v5.azurewebsites.net/api/command/");

await commandClient.PostAsync(new FooCommand { Value = "en-GB" });

Commands with result:

var result = await commandClient.PostAsync(new BazCommand { Value = "en-GB" });
Queries

Create a QueryClient and invoke PostAsync or GetAsync:

var queryClient = new QueryClient("https://commandquery-sample-aspnetcore-v5.azurewebsites.net/api/query/");

var result = await queryClient.PostAsync(new BarQuery { Id = 1 });
result = await queryClient.GetAsync(new BarQuery { Id = 1 });
Samples

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
2.0.0 74 7/29/2021
1.0.0 313 2/2/2020
0.9.0 232 11/20/2019
0.8.0 360 2/16/2019

- Removed target framework net461 🎯
- Now uses System.Text.Json, instead of Newtonsoft.Json 📜
- Added constructor with HttpClient and JsonSerializerOptions parameters to CommandClient and QueryClient
- Removed sync over async methods in CommandClient and QueryClient 💥
- Added CancellationToken parameter to methods in CommandClient and QueryClient
- Nested object graph queries via GET is now supported