skip to Main Content

Implement DelegatingHandler in ASP.NET Core 5.0 Web API?

public class AuthenticationHandler : DelegatingHandler { protected override async Task<HttpResponseMessage> SendAsync( HttpRequestMessage req, CancellationToken cancellationToken) { Debug.WriteLine("Process request"); // Call the inner handler. var response = await base.SendAsync(req, cancellationToken); Debug.WriteLine("Process response"); return response; } } Solution Files: https://i.stack.imgur.com/M4yv6.png The only…

VIEW QUESTION
Back To Top
Search