【发布时间】:2019-06-04 19:06:53
【问题描述】:
我必须捕获每个请求和响应的特定字段,并将详细信息发送到 asp.net 核心中的另一个 api。
我在下面的 github 链接 https://gist.github.com/elanderson/c50b2107de8ee2ed856353dfed9168a2 的帮助下创建了一个中间件 并在startup.cs类的cofigure方法中注册。
我怀疑代码 _logger.LogInformation(await FormatRequest(context.Request)) 将记录传入请求的位置? 如何将传入请求从中间件发送到 url?
【问题讨论】:
标签: c# asp.net-core