Dodo.HttpClient.ResiliencePolicies
1.0.1
Prefix Reserved
See the version list below for details.
dotnet add package Dodo.HttpClient.ResiliencePolicies --version 1.0.1
NuGet\Install-Package Dodo.HttpClient.ResiliencePolicies -Version 1.0.1
<PackageReference Include="Dodo.HttpClient.ResiliencePolicies" Version="1.0.1" />
paket add Dodo.HttpClient.ResiliencePolicies --version 1.0.1
#r "nuget: Dodo.HttpClient.ResiliencePolicies, 1.0.1"
// Install Dodo.HttpClient.ResiliencePolicies as a Cake Addin #addin nuget:?package=Dodo.HttpClient.ResiliencePolicies&version=1.0.1 // Install Dodo.HttpClient.ResiliencePolicies as a Cake Tool #tool nuget:?package=Dodo.HttpClient.ResiliencePolicies&version=1.0.1
Dodo.HttpClient.ResiliencePolicies library
The main goal of this library is to provide unified http request retrying policies for the HttpClient that just works.
Actually this library wraps awesome Polly library with the predefined settings to allow developers to use it as is without a deep dive to Polly.
The DefaultPolicy
provided by this library combines RetryPolicy
, CircuitBreakerPolicy
and TimeoutPolicy
under the hood. See the corresponding sections of the README.
Functionality provided by the library
Library provides few methods which returns the IHttpClientBuilder and you may chain it with other HttpMessageHandler.
There are list of public methods to use:
// Default policies for a single host environment using all defaults
IHttpClientBuilder AddDefaultPolicies(this IHttpClientBuilder clientBuilder);
// Default policies for a single host environment with custom settings
IHttpClientBuilder AddDefaultPolicies(this IHttpClientBuilder clientBuilder, HttpClientSettings settings);
// Default policies for a multi host environments using all defaults
IHttpClientBuilder AddDefaultHostSpecificPolicies(this IHttpClientBuilder clientBuilder);
// Default policies for a multi host environments with custom settings
IHttpClientBuilder AddDefaultHostSpecificPolicies(this IHttpClientBuilder clientBuilder, HttpClientSettings settings);
// Default JsonClient includes DefaultPolicies with custom settings
IHttpClientBuilder AddJsonClient<TClientInterface, TClientImplementation>(
this IServiceCollection sc,
Uri baseAddress,
HttpClientSettings settings,
string clientName = null)
where TClientInterface : class
where TClientImplementation : class, TClientInterface
There are also available HttpClientSettings
, IRetrySettings
and ICircuitBreakerSettings
to tune-in the default policies. See the corresponding sections of the README.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection (>= 2.1.1)
- Microsoft.Extensions.Http (>= 2.1.1)
- Microsoft.Extensions.Http.Polly (>= 2.1.1)
- Polly (>= 7.2.0)
- Polly.Contrib.WaitAndRetry (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.