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 a 429 (Too Many Requests) response, the retry delay honors the Retry-After header. It prefers the delta-seconds form and falls back to the absolute date/time form. When the header is absent, it applies a 10-second delay. 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, to support chained calls.

AddAuthenticationClientResilienceHandler(IHttpClientBuilder)

Adds a standard resilience handler for authentication clients. It enables retries only for safe HTTP methods and lowers the circuit breaker's minimum throughput to 5 requests.

public static IHttpClientBuilder AddAuthenticationClientResilienceHandler(this IHttpClientBuilder builder)

Parameters

builder IHttpClientBuilder

The IHttpClientBuilder to configure.

Returns

IHttpClientBuilder

The same builder, to support chained calls.