Tôi đang di trú mã từ một dự án WebApi 2 hiện có và tôi tự hỏi làm thế nào để thực hiện tương đương với mã dưới đây trong ASP.NET 5 MVC 6. Tôi không thấy bất kỳ mã tuyến đường chấp nhận tùy chọn trình xử lý.Tạo một proxy API trong ASP.NET MVC 6
config.Routes.MapHttpRoute("SomeApiProxy", "api/someapi/{*path}",
handler: HttpClientFactory.CreatePipeline(new HttpClientHandler(), new DelegatingHandler[] {new ForwardingProxyHandler(new Uri("http://some-api.com/api/v2/"))}),
defaults: new {path = RouteParameter.Optional},
constraints: null
);
Có phải chỉ nhận được yêu cầu hoặc yêu cầu nào không? –