Fluens.Web.Http
0.9.4
dotnet add package Fluens.Web.Http --version 0.9.4
NuGet\Install-Package Fluens.Web.Http -Version 0.9.4
<PackageReference Include="Fluens.Web.Http" Version="0.9.4" />
<PackageVersion Include="Fluens.Web.Http" Version="0.9.4" />
<PackageReference Include="Fluens.Web.Http" />
paket add Fluens.Web.Http --version 0.9.4
#r "nuget: Fluens.Web.Http, 0.9.4"
#:package Fluens.Web.Http@0.9.4
#addin nuget:?package=Fluens.Web.Http&version=0.9.4
#tool nuget:?package=Fluens.Web.Http&version=0.9.4
Fluens.Web.Http
HttpClient registration helpers with catalog-backed service discovery, resilience, and logging for Fluens web applications.
Installation
dotnet add package Fluens.Web.Http
Usage
fluensBuilder
.AddHttp()
.AddHttpClient<IOrdersClient, OrdersClient>(opts =>
{
opts.BaseAddress = "http://orders-service"; // host is the catalog service name
opts.EnableResilience = true;
});
Service discovery is decided per client. HttpClientOptions.EnableServiceDiscovery is bool? and defaults to
null, which follows the global Fluens:Http:EnableServiceDiscovery flag (default true). Set it to false for a
client that calls an external host, so its request host is not looked up in the service catalog (the lookup
cannot resolve an external host and every request would fail). Set it to true to add the handler to one client
while the global flag is false.
fluensBuilder.AddHttpClient<IPaymentClient, PaymentClient>(opts =>
{
opts.BaseAddress = "https://payment.example.com";
opts.EnableServiceDiscovery = false; // external host, skip the catalog
});
When service discovery is on for a client, the request host (e.g. orders-service) is resolved through the
central IServiceCatalog (registered by Fluens.Web.Discovery via AddDiscovery()); a ServiceDiscoveryHandler
rewrites the request URI to the resolved host/port and throws HttpRequestException when no healthy
instance is available. There is no dependency on Microsoft.Extensions.ServiceDiscovery.
AddHttp() and AddHttpClient() both register ServiceDiscoveryHandler (transient) and a no-op IServiceCatalog
default (NullServiceCatalog) through TryAdd, so AddHttpClient() also works when the global flag is false
and a client opts in. The no-op default means the handler is always constructable even when you do not call AddDiscovery() — this
matters because WebApplication.Build() in the Development environment enables eager DI validation
(ValidateOnBuild/ValidateScopes) and would otherwise fail at startup on the unregistered dependency.
AddDiscovery() overrides the default with the live catalog; with the no-op default in effect every resolve
returns null, surfacing a clear HttpRequestException at request time rather than an opaque startup crash.
AddHttp() accepts an optional Action<HttpOptions>? configure callback; a callback-only call — with no
matching Fluens:Http configuration section present — is still honoured and validated.
Configuration section: Fluens:Http:
{
"Fluens": {
"Http": {
"DefaultTimeoutSeconds": 30,
"EnableServiceDiscovery": true,
"EnableLogging": true
}
}
}
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.Web.Contexts (>= 0.9.4)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Http.Resilience (>= 10.11.0)
- Microsoft.Extensions.Logging (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.13)
- Scrutor (>= 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Fluens.Web.Http:
| Package | Downloads |
|---|---|
|
Fluens.Web.Messaging
P2P HTTP/Protobuf mesh adapter for cross-application Fluens messaging, with shared-key signed cluster authentication. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.4 | 271 | 11/30/2026 |
| 0.9.3 | 374 | 11/17/2026 |
| 0.9.2 | 197 | 10/21/2026 |
| 0.9.1 | 507 | 10/13/2026 |
| 0.9.0 | 117 | 10/13/2026 |
| 0.8.7 | 272 | 10/12/2026 |
| 0.8.6 | 122 | 10/12/2026 |
| 0.8.5 | 134 | 10/7/2026 |
| 0.8.4 | 109 | 10/6/2026 |
| 0.8.3 | 114 | 10/6/2026 |
| 0.8.2 | 187 | 10/5/2026 |
| 0.8.1 | 190 | 9/15/2026 |
| 0.8.0 | 135 | 9/15/2026 |
| 0.7.11 | 135 | 9/15/2026 |
| 0.7.10 | 132 | 9/13/2026 |
| 0.7.9 | 139 | 9/11/2026 |
| 0.7.8 | 131 | 9/10/2026 |
| 0.7.7 | 155 | 9/10/2026 |
| 0.7.6 | 190 | 7/1/2026 |
| 0.7.5 | 164 | 6/22/2026 |