Fluens.Web
0.6.6
dotnet add package Fluens.Web --version 0.6.6
NuGet\Install-Package Fluens.Web -Version 0.6.6
<PackageReference Include="Fluens.Web" Version="0.6.6" />
<PackageVersion Include="Fluens.Web" Version="0.6.6" />
<PackageReference Include="Fluens.Web" />
paket add Fluens.Web --version 0.6.6
#r "nuget: Fluens.Web, 0.6.6"
#:package Fluens.Web@0.6.6
#addin nuget:?package=Fluens.Web&version=0.6.6
#tool nuget:?package=Fluens.Web&version=0.6.6
Fluens.Web
ASP.NET Core base types for Fluens web libraries: Result-to-HTTP mapping, global exception handler, and paged responses.
Installation
dotnet add package Fluens.Web
Usage
fluensBuilder.AddWeb();
// In middleware pipeline
app.UseExceptionHandler(); // GlobalExceptionHandler returns ProblemDetails
ResultExtensions map Result / Result<T> to HTTP responses:
app.MapPost("/orders", async (CreateOrder cmd, ICommandDispatcher dispatcher, CancellationToken ct) =>
{
var result = await dispatcher.SendAsync(cmd, ct);
return result.ToHttpResult(); // 204 on success, 4xx/5xx on failure
});
Error mapping: NotFoundError → 404, ValidationError → 400, ConflictError → 409, ForbiddenError → 403, unknown Error → 500.
Server-Side Localization
Pass an optional IStringLocalizer to translate error messages server-side. The Error.Message is used as the localization key and {Key} placeholders are replaced with MessageArgs values:
app.MapPost("/orders", async (
CreateOrder cmd,
ICommandDispatcher dispatcher,
IStringLocalizer<OrderErrors> localizer,
CancellationToken ct) =>
{
var result = await dispatcher.SendAsync(cmd, ct);
return result.ToHttpResult(localizer); // Translates error messages using localizer
});
When no localizer is provided (default), Error.Message is returned as-is — maintaining full backward compatibility. MessageArgs is always included in ProblemDetails.Extensions["messageArgs"] regardless of whether a localizer is used.
TranslatableMessageExtensions
Translate TranslatableMessage instances (from Fluens.Kernel.Translations) using ASP.NET Core IStringLocalizer:
var message = new TranslatableMessage("order.status.changed")
.WithArg("orderId", "ORD-123")
.WithArg("newStatus", "Shipped");
// Translate using IStringLocalizer — Code is the localization key,
// {Key} placeholders are replaced with Args values
string translated = message.Translate(localizer);
License
This project is licensed under the MIT License.
| 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
- Fluens (>= 0.6.6)
- Fluens.Extensions (>= 0.6.6)
- Fluens.Kernel (>= 0.6.6)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Fluens.Web:
| Package | Downloads |
|---|---|
|
Fluens.Web.Contexts
CorrelationId propagation, context accessors, and consumed message context for ASP.NET Core applications. |
|
|
Fluens.Web.Api
Endpoint discovery, OpenAPI documentation with Scalar UI, and fixed-window rate limiting for ASP.NET Core minimal APIs. |
|
|
Fluens.Web.Cors
CORS configuration and middleware setup for Fluens web applications. |
|
|
Fluens.Web.Auth
JWT Bearer authentication and security headers middleware for Fluens web applications. |
|
|
Fluens.Web.Modularity
Module discovery, registration, and pipeline configuration for modular web applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.6 | 54 | 3/11/2026 |
| 0.6.5 | 131 | 3/4/2026 |
| 0.6.4 | 123 | 3/4/2026 |
| 0.6.3 | 137 | 3/3/2026 |
| 0.6.2 | 141 | 3/2/2026 |
| 0.6.1 | 142 | 3/2/2026 |
| 0.6.0 | 133 | 3/1/2026 |
| 0.5.7 | 136 | 3/1/2026 |
| 0.5.6 | 132 | 3/1/2026 |
| 0.5.5 | 136 | 2/28/2026 |
| 0.5.4 | 132 | 2/28/2026 |
| 0.5.3 | 140 | 2/27/2026 |
| 0.5.2 | 132 | 2/27/2026 |
| 0.5.1 | 137 | 2/27/2026 |
| 0.5.0 | 140 | 2/26/2026 |
| 0.3.2 | 141 | 2/26/2026 |
| 0.3.1 | 141 | 2/26/2026 |
| 0.3.0 | 145 | 2/24/2026 |
| 0.2.5 | 138 | 2/24/2026 |
| 0.2.4 | 137 | 2/24/2026 |