Franz.Common.Http.Bootstrap
1.6.15
See the version list below for details.
dotnet add package Franz.Common.Http.Bootstrap --version 1.6.15
NuGet\Install-Package Franz.Common.Http.Bootstrap -Version 1.6.15
<PackageReference Include="Franz.Common.Http.Bootstrap" Version="1.6.15" />
<PackageVersion Include="Franz.Common.Http.Bootstrap" Version="1.6.15" />
<PackageReference Include="Franz.Common.Http.Bootstrap" />
paket add Franz.Common.Http.Bootstrap --version 1.6.15
#r "nuget: Franz.Common.Http.Bootstrap, 1.6.15"
#:package Franz.Common.Http.Bootstrap@1.6.15
#addin nuget:?package=Franz.Common.Http.Bootstrap&version=1.6.15
#tool nuget:?package=Franz.Common.Http.Bootstrap&version=1.6.15
Franz.Common.Http.Bootstrap
Package: Franz.Common.Http.Bootstrap
Current Version: 1.6.15
Opinionated HTTP bootstrapper for the Franz Framework. Centralizes common ASP.NET Core HTTP wiring (controllers, auth, headers, docs, serialization, health checks, multi-tenancy) and optionally registers config-driven Refit clients so applications get consistent, production-ready defaults with minimal boilerplate.
Why use this package
- One-line HTTP architecture wiring for consistent apps across teams.
- Plugs into Franz primitives (multi-tenancy, header context, identity, docs).
- Config-driven optional features (Refit clients) keep
Program.cstidy. - Reduces boilerplate and enforces best practices (correlation, tenant propagation, policy reuse).
Quickstart
Install (private feed)
# Example: add private feed (adjust your feed credentials)
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "<user>" \
--password "<pass>" \
--store-password-in-clear-text
dotnet add package Franz.Common.Http.Bootstrap --version 1.4.1
Minimal wiring (Program.cs)
using Franz.Common.Http.Bootstrap.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Adds controllers, auth, headers, docs, multi-tenancy, serialization, health, etc.
builder.Services.AddHttpArchitecture(builder.Environment, builder.Configuration, typeof(Program).Assembly);
var app = builder.Build();
app.UseHttpArchitecture(); // optional pipeline helper if provided
app.MapControllers();
app.Run();
AddHttpArchitecture(...) wires the canonical Franz HTTP stack. If Refit is enabled in configuration it will also register Refit clients automatically.
Refit (optional) � what the bootstrapper does
When Franz:HttpClients:EnableRefit is true, the bootstrapper will:
Read
Franz:HttpClients:Apisfrom configuration.Resolve each typed Refit interface (prefer
InterfaceType� assembly-qualified; falls back to assembly scan).Invoke
AddFranzRefit<TClient>(...)reflectively to register the typed client.For each client it wires:
- Base address
FranzRefitHeadersHandler(addsX-Correlation-ID,X-Tenant-Id, optionalX-User-Id)- Optional
FranzRefitAuthHandler(if anITokenProvideris registered) - Optional Polly policy attachment (by name, via the host's policy registry)
appsettings.json example (Refit)
{
"Franz": {
"HttpClients": {
"EnableRefit": true,
"Apis": {
"Weather": {
"InterfaceType": "MyApp.ApiClients.IWeatherApi, MyApp",
"BaseUrl": "https://api.weather.local",
"Policy": "DefaultHttpRetry"
}
}
}
}
}
Notes
InterfaceType(assembly-qualified) is recommended for deterministic resolution.Policyis optional � if present the bootstrapper will attach the named policy from the host'sIPolicyRegistry<string>.
Features (at a glance)
- Registers controllers, Swagger documentation, and health checks.
- Authentication and identity context wiring.
- Header context utilities and header-based capabilities.
- Multi-tenancy integration via
Franz.Common.Http.MultiTenancy. - Optional, config-driven Refit client registration with correlation, auth, Polly, and OTEL-friendly annotations.
- Opinionated, production-friendly defaults to reduce friction.
Host project dependencies (when using Refit)
When enabling Refit you must ensure the host project references the Refit integration and related primitives:
Franz.Common.Http.Refit(the Refit integration package)Refit.HttpClientFactory(providesAddRefitClient<T>()) or an equivalent Refit package exposing factory helpersMicrosoft.Extensions.HttpPolly&Microsoft.Extensions.Http.Polly(if you want policy integration)Serilog(recommended for enriched logging)OpenTelemetry.Api(optional; used to tagActivity.Current)
The bootstrapper itself depends on other Franz packages (http modules). Make sure those Franz packages are available to the host.
Troubleshooting
Refit clients not registered:
- Ensure
"Franz:HttpClients:EnableRefit": trueand thatFranz.Common.Http.Refitis referenced in the host project.
- Ensure
Typed interface cannot be resolved:
- Add
InterfaceTypewith the assembly-qualified type name (e.g.MyApp.ApiClients.IWeatherApi, MyApp) to the config entry or ensure the interface is in the assembly passed toAddHttpArchitecture.
- Add
AddRefitClient<T>()not found:- Confirm
Refit.HttpClientFactory(or the Refit package exposing the factory) is referenced in the project that performs the registration, and addusing Refit;where needed.
- Confirm
Polly policy not applied:
- Register policies in
IPolicyRegistry<string>(services.AddPolicyRegistry().Add("MyPolicy", policy)).
- Register policies in
Example: manual Refit registration (if you prefer code)
builder.Services.AddPolicyRegistry()
.Add("DefaultHttpRetry", HttpPolicyExtensions
.HandleTransientHttpError()
.WaitAndRetryAsync(new[] { TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(300) }));
builder.Services.AddFranzRefit<MyApp.ApiClients.IWeatherApi>(
name: "Weather",
baseUrl: "https://api.weather.local",
policyName: "DefaultHttpRetry");
Changelog (recent)
v1.4.1
- Added optional Refit client registration via the HTTP bootstrapper (config-driven).
- Refit clients registered by the bootstrapper support correlation header injection, optional token injection, and Polly policy wiring.
For full changelog/history see the repository CHANGELOG.md.
Contributing & License
This package is part of the private Franz Framework. Contributions are internal; follow your team�s contribution guidelines. Licensed under MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- Franz.Common.Bootstrap (>= 1.6.15)
- Franz.Common.Http (>= 1.6.15)
- Franz.Common.Http.Authentication (>= 1.6.15)
- Franz.Common.Http.Documentation (>= 1.6.15)
- Franz.Common.Http.Headers (>= 1.6.15)
- Franz.Common.Http.Identity (>= 1.6.15)
- Franz.Common.Http.MultiTenancy (>= 1.6.15)
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 |
|---|---|---|
| 1.6.19 | 127 | 10/25/2025 |
| 1.6.15 | 160 | 10/20/2025 |
| 1.6.14 | 164 | 10/15/2025 |
| 1.6.3 | 164 | 10/9/2025 |
| 1.6.2 | 165 | 10/7/2025 |
| 1.5.9 | 170 | 9/24/2025 |
| 1.5.4 | 167 | 9/23/2025 |
| 1.5.3 | 204 | 9/21/2025 |
| 1.5.2 | 211 | 9/21/2025 |
| 1.5.0 | 206 | 9/21/2025 |
| 1.4.4 | 181 | 9/20/2025 |
| 1.3.14 | 298 | 9/18/2025 |
| 1.3.13 | 291 | 9/18/2025 |
| 1.3.5 | 289 | 9/17/2025 |
| 1.3.4 | 294 | 9/16/2025 |
| 1.3.3 | 297 | 9/16/2025 |
| 1.3.2 | 266 | 9/15/2025 |
| 1.3.1 | 87 | 9/12/2025 |
| 1.3.0 | 288 | 8/25/2025 |
| 1.2.65 | 179 | 3/3/2025 |
| 1.2.64 | 130 | 1/29/2025 |
| 1.2.63 | 125 | 1/27/2025 |
| 1.2.62 | 96 | 1/8/2025 |