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 answers i can find are for older versions of Web API, where the structure of the solutions was very different