Dodo.HttpClient.ResiliencePolicies 1.0.3

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
.NET Core 3.1 .NET Standard 2.0
There is a newer version of this package available.
See the version list below for details.
dotnet add package Dodo.HttpClient.ResiliencePolicies --version 1.0.3
NuGet\Install-Package Dodo.HttpClient.ResiliencePolicies -Version 1.0.3
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="Dodo.HttpClient.ResiliencePolicies" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dodo.HttpClient.ResiliencePolicies --version 1.0.3
#r "nuget: Dodo.HttpClient.ResiliencePolicies, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dodo.HttpClient.ResiliencePolicies as a Cake Addin
#addin nuget:?package=Dodo.HttpClient.ResiliencePolicies&version=1.0.3

// Install Dodo.HttpClient.ResiliencePolicies as a Cake Tool
#tool nuget:?package=Dodo.HttpClient.ResiliencePolicies&version=1.0.3

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
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

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
2.0.2 29,471 3/3/2022
2.0.1 97,619 12/7/2020
1.0.3 3,975 10/9/2020
1.0.2 20,645 5/19/2020
1.0.1 381 4/10/2020