using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HttpClientStudy.Core { public class HandlerA : DelegatingHandler { protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { //请求前业务 var response = await base.SendAsync(request, cancellationToken); //响应后业务 return response; } } }