Dloizides.Http.Resilience 0.1.0

dotnet add package Dloizides.Http.Resilience --version 0.1.0
                    
NuGet\Install-Package Dloizides.Http.Resilience -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dloizides.Http.Resilience" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dloizides.Http.Resilience" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Dloizides.Http.Resilience" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dloizides.Http.Resilience --version 0.1.0
                    
#r "nuget: Dloizides.Http.Resilience, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dloizides.Http.Resilience@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dloizides.Http.Resilience&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Dloizides.Http.Resilience&version=0.1.0
                    
Install as a Cake Tool

Dloizides.Http.Resilience

House HttpClient defaults, built on Microsoft.Extensions.Http.Resilience (no own Polly pipeline).

builder.Services.AddHttpResilienceDefaults();
builder.Services.AddHttpClient("avatar-fetch").BlockPrivateAddresses();
  • AddHttpResilienceDefaults adds the standard resilience handler to every HttpClient: total and per-attempt timeout, retry, circuit breaker. Retries are disabled for unsafe methods (POST, PATCH, PUT, DELETE, CONNECT), and a service's own configure cannot turn them back on. The breaker is kept per authority (scheme, host, port), so failures at one host never open it for another; a blocked address is neither retried nor counted by the breaker.
  • BlockPrivateAddresses is for a named client that calls a user-supplied URL (SSRF, OWASP API7). Every connection, including each redirect hop, resolves the host and refuses it with BlockedOutboundAddressException unless every address is public: IPv4 outside every IANA special-purpose block, IPv6 only in global unicast 2000::/3 minus 2001::/23, 2001:db8::/32 and 3fff::/20. IPv4-mapped, NAT64 (64:ff9b::/96, 64:ff9b:1::/48) and 6to4 (2002::/16) addresses are unwrapped and checked as IPv4. The proxy is off for this client so the check sees the real target. The guard is applied last, after every other handler setup: a later ConfigurePrimaryHttpMessageHandler with a SocketsHttpHandler stays guarded, and any other primary handler throws InvalidOperationException when the client is created. HTTP/3 (QUIC) bypasses the connect check, so this client is capped at HTTP/2: a 3.0 request is downgraded, and a 3.0 request with RequestVersionExact throws BlockedOutboundAddressException.

Reliability defaults and security floor row 11 of Dloizides.ServiceDefaults 2.0 (SVCDEF-1.2).

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dloizides.Http.Resilience:

Package Downloads
Dloizides.ServiceDefaults

Aspire-style service defaults for ASP.NET Core: OpenTelemetry (logging/metrics/tracing) wiring, HTTP resilience + service discovery, standard health-check registration (via ServiceDefaults.HealthChecks), and the platform endpoint map (anonymous /health/live|start|ready Kubernetes probes plus an ACME HTTP-01 no-op). Extracted from ~8 services that had each hand-copied the ServiceDefaults/Extensions.cs; normalizes the PostgressConnection connection-string typo by resolving both the correct (PostgresConnection) and legacy-typo keys.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 147 11/21/2026