Singulink.Net.Http.Api.Client
2.0.2
Prefix Reserved
dotnet add package Singulink.Net.Http.Api.Client --version 2.0.2
NuGet\Install-Package Singulink.Net.Http.Api.Client -Version 2.0.2
<PackageReference Include="Singulink.Net.Http.Api.Client" Version="2.0.2" />
<PackageVersion Include="Singulink.Net.Http.Api.Client" Version="2.0.2" />
<PackageReference Include="Singulink.Net.Http.Api.Client" />
paket add Singulink.Net.Http.Api.Client --version 2.0.2
#r "nuget: Singulink.Net.Http.Api.Client, 2.0.2"
#:package Singulink.Net.Http.Api.Client@2.0.2
#addin nuget:?package=Singulink.Net.Http.Api.Client&version=2.0.2
#tool nuget:?package=Singulink.Net.Http.Api.Client&version=2.0.2
Singulink HTTP API Toolkit
HTTP API Toolkit is a set of client and service libraries for building and consuming HTTP APIs in .NET based on a consistent set of opinionated conventions. A service and a client built with the toolkit agree on how sessions, errors, streamed results and SignalR hubs work, so application code deals with typed exceptions, typed hub contracts and plain IAsyncEnumerable<T> results instead of HTTP plumbing.
✔️ Cookie sessions validated without a store lookup
✔️ Session token rotation and theft detection
✔️ Errors travel as typed exceptions
✔️ Streamed results with keep-alive and error propagation
✔️ Strongly typed SignalR hub contracts
✔️ Runs on desktop, mobile and browser clients
✔️ Trimming and AOT friendly
Details of each component are provided below:
| Library | Status | Package |
|---|---|---|
| Singulink.Net.Http.Api | Public | |
| Singulink.Net.Http.Api.Client | Public | |
| Singulink.Net.Http.Api.Client.SignalR | Public | |
| Singulink.Net.Http.Api.Service | Public |
Supported Runtimes: .NET 10.0+
Libraries may be in the following states:
- Internal: Source code (and possibly a nuget package) is available but the library is intended for internal use at this time.
- Preview: Library is available for public preview but the APIs may not be fully documented and the API surface is subject to change without notice.
- Public: Library is intended for public use with a fully documented and stable API surface.
You are welcome to use any libraries or code in this repository that you find useful and feedback/contributions are appreciated regardless of library state.
About Singulink
We are a small team of engineers and designers dedicated to building beautiful, functional and well-engineered software solutions. We offer very competitive rates as well as fixed-price contracts and welcome inquiries to discuss any custom development / project support needs you may have.
These packages are part of our Singulink Libraries collection. Visit https://github.com/Singulink to see our full list of publicly available libraries and other open-source projects.
Components
Singulink.Net.Http.Api
Shared library referenced by both clients and services. It contains the parts of the conventions that both sides must agree on, and has no ASP.NET Core dependency so it can also be referenced by data contract and data layer projects:
- The
ApiExceptionhierarchy (BadRequestApiException,UnauthorizedApiException,NotFoundApiException,ValidationApiException,ServerErrorApiExceptionand more), thrown on the server and rethrown as the same type on the client. - The
StreamingResponseformat and reader for streamed results. HubMessage,HubMethodandHubStreamdefinitions for strongly typed SignalR hub contracts.- The
ISessionDatasession record contract implemented by data layer projects.
Singulink.Net.Http.Api.Service
ASP.NET Core library for building services. Sessions are cookie-based and backed by an encrypted, self-contained session token, so most requests need no session store lookup. Sessions use a sliding expiry with periodic refresh, token rotation for theft detection and a grace window for concurrent requests, and security-sensitive operations can force validation so they always act on current data.
- Cross-origin request blocking (CSRF protection) and a user ID precondition that catches stale clients after account switches.
- Exceptions mapped to error responses through a single
IApiExceptionHandler, with reference IDs logged and reported for unexpected failures. - Endpoints returning
IAsyncEnumerable<T>automatically converted to flushed, keep-alive capable streams that propagate errors. - SignalR hub filter that reports hub exceptions to clients with the same typed errors as HTTP requests.
Singulink.Net.Http.Api.Client
Base class for API clients on any .NET platform, including browser (WebAssembly) and mobile apps:
- Session cookie handling with persistence callbacks, so a signed-in session survives app restarts.
- Automatic user ID preconditions on requests.
- Error responses rethrown as typed
ApiExceptioninstances. - Streamed results consumed as
IAsyncEnumerable<T>. - Trimming and AOT friendly when used with a source-generated JSON serializer context.
Singulink.Net.Http.Api.Client.SignalR
Adds SignalR support to API clients:
- Hub connections that share the client's session and always present the current session token, including on reconnect.
ApiHubConnectionwith a strongly typed message, method and stream API based on shared contract definitions.- Hub errors surfaced as the same typed
ApiExceptioninstances as HTTP requests.
Further Reading
You can view the full documentation, including guides and API documentation, on the project documentation site.
| 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
- Microsoft.Extensions.Http (>= 10.0.1)
- Singulink.Net.Http.Api (>= 2.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Singulink.Net.Http.Api.Client:
| Package | Downloads |
|---|---|
|
Singulink.Net.Http.Api.Client.SignalR
SignalR client library for the Singulink HTTP API Toolkit. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.2 | 0 | 9/5/2026 |
| 2.0.1 | 29 | 9/4/2026 |
| 1.14.1 | 105 | 8/28/2026 |
| 1.14.0 | 170 | 7/22/2026 |
| 1.13.0 | 151 | 6/16/2026 |
| 1.12.0 | 133 | 5/13/2026 |
| 1.11.0 | 124 | 5/13/2026 |
| 1.10.2 | 146 | 2/20/2026 |
| 1.10.1 | 140 | 2/20/2026 |
| 1.10.0 | 137 | 2/16/2026 |
| 1.9.0 | 125 | 2/15/2026 |
| 1.8.1 | 139 | 12/31/2025 |
| 1.8.0 | 132 | 12/31/2025 |
| 1.7.2 | 135 | 12/27/2025 |
| 1.7.1 | 122 | 12/27/2025 |
| 1.7.0 | 128 | 12/27/2025 |
| 1.6.0 | 221 | 12/25/2025 |
| 1.5.1 | 307 | 8/26/2025 |
| 1.5.0 | 217 | 8/25/2025 |