Table of Contents

Class DiscoveryHttpMessageHandler

Namespace
Steeltoe.Common.Http.Discovery
Assembly
Steeltoe.Common.Http.dll

A DelegatingHandler implementation that performs Service Discovery

public class DiscoveryHttpMessageHandler : DelegatingHandler, IDisposable
Inheritance
DiscoveryHttpMessageHandler
Implements
Inherited Members

Constructors

DiscoveryHttpMessageHandler(IDiscoveryClient, ILogger<DiscoveryHttpClientHandler>)

Initializes a new instance of the DiscoveryHttpMessageHandler class.

public DiscoveryHttpMessageHandler(IDiscoveryClient discoveryClient, ILogger<DiscoveryHttpClientHandler> logger = null)

Parameters

discoveryClient IDiscoveryClient

Service discovery client to use - provided by calling services.AddDiscoveryClient(Configuration)

logger ILogger<DiscoveryHttpClientHandler>

ILogger for capturing logs from Discovery operations

Methods

SendAsync(HttpRequestMessage, CancellationToken)

protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Parameters

request HttpRequestMessage
cancellationToken CancellationToken

Returns

Task<HttpResponseMessage>