Table of Contents

Class HttpClientBuilderExtensions

Namespace
Visus.AddressValidation.Extensions
Assembly
Visus.AddressValidation.dll

Contains extension methods for IHttpClientBuilder.

public static class HttpClientBuilderExtensions
Inheritance
HttpClientBuilderExtensions
Inherited Members

Methods

AddAddressValidationClientResilienceHandler(IHttpClientBuilder)

Adds a standard resilience handler for the address validation HTTP client. On 429 (Too Many Requests) responses, the retry delay honors the Retry-After header. The delta-seconds form is preferred; the absolute date/time form is used as a fallback. When no header is present, a 10-second delay is applied. All other status codes use the default retry delay strategy.

public static IHttpClientBuilder AddAddressValidationClientResilienceHandler(this IHttpClientBuilder builder)

Parameters

builder IHttpClientBuilder

The IHttpClientBuilder to configure.

Returns

IHttpClientBuilder

The same builder so that multiple calls can be chained.

AddAuthenticationClientResilienceHandler(IHttpClientBuilder)

Adds a standard resilience handler configured for authentication clients, enabling retries only for safe HTTP methods and lowering the circuit-breaker minimum throughput threshold to 5 requests.

public static IHttpClientBuilder AddAuthenticationClientResilienceHandler(this IHttpClientBuilder builder)

Parameters

builder IHttpClientBuilder

The IHttpClientBuilder to configure.

Returns

IHttpClientBuilder

The same builder so that multiple calls can be chained.