Singulink.Net.Http.Api.Service
2.0.1
Prefix Reserved
See the version list below for details.
dotnet add package Singulink.Net.Http.Api.Service --version 2.0.1
NuGet\Install-Package Singulink.Net.Http.Api.Service -Version 2.0.1
<PackageReference Include="Singulink.Net.Http.Api.Service" Version="2.0.1" />
<PackageVersion Include="Singulink.Net.Http.Api.Service" Version="2.0.1" />
<PackageReference Include="Singulink.Net.Http.Api.Service" />
paket add Singulink.Net.Http.Api.Service --version 2.0.1
#r "nuget: Singulink.Net.Http.Api.Service, 2.0.1"
#:package Singulink.Net.Http.Api.Service@2.0.1
#addin nuget:?package=Singulink.Net.Http.Api.Service&version=2.0.1
#tool nuget:?package=Singulink.Net.Http.Api.Service&version=2.0.1
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: cookie-based sessions that need no server-side lookup on most requests, errors that travel as typed exceptions, streamed results with keep-alive and error propagation, and strongly typed SignalR hub contracts shared between server and client.
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:
✔️ The ApiException hierarchy (BadRequestApiException, UnauthorizedApiException, NotFoundApiException, ValidationApiException, ServerErrorApiException and more), thrown on the server and rethrown as the same type on the client
✔️ The StreamingResponse format and reader for streamed results
✔️ The ISessionData session record contract, implemented by data-layer projects without an ASP.NET Core dependency
✔️ HubMessage, HubMethod and HubStream definitions for strongly typed SignalR hub contracts
Singulink.Net.Http.Api.Service
ASP.NET Core library for building services:
✔️ Cookie-based sessions backed by an encrypted, self-contained session token, so most requests need no session store lookup
✔️ Sliding session expiry with periodic refresh, token rotation for theft detection, and a grace window for concurrent requests
✔️ Forced validation for security-sensitive operations, 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 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:
✔️ 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 ApiException instances
✔️ 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
✔️ ApiHubConnection with a strongly typed message, method and stream API based on shared contract definitions
✔️ Hub errors surfaced as the same typed ApiException instances 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
- MyCSharp.HttpUserAgentParser (>= 3.0.28)
- Singulink.Enums (>= 2.3.1)
- Singulink.Net.Http.Api (>= 2.0.1)
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.2 | 0 | 9/5/2026 |
| 2.0.1 | 26 | 9/4/2026 |
| 1.14.1 | 94 | 8/28/2026 |
| 1.14.0 | 156 | 7/22/2026 |
| 1.13.0 | 134 | 6/16/2026 |
| 1.12.0 | 125 | 5/13/2026 |
| 1.11.0 | 107 | 5/13/2026 |
| 1.10.2 | 126 | 2/20/2026 |
| 1.10.1 | 129 | 2/20/2026 |
| 1.10.0 | 121 | 2/16/2026 |
| 1.9.0 | 122 | 2/15/2026 |
| 1.8.0 | 148 | 12/31/2025 |
| 1.7.2 | 135 | 12/27/2025 |
| 1.7.1 | 133 | 12/27/2025 |
| 1.7.0 | 139 | 12/27/2025 |
| 1.6.0 | 245 | 12/25/2025 |
| 1.5.0 | 227 | 8/25/2025 |
| 1.4.0 | 174 | 8/22/2025 |
| 1.3.0 | 160 | 8/16/2025 |