简体   繁体   English

RestSharp - 使用 HttpTracerHandler 委托处理程序

[英]RestSharp - Delegating handlers with HttpTracerHandler

In the RestSharp documentation here ( https://restsharp.dev/v107/#delegating-handlers ) there's a code snippet that looks like this:在此处的 RestSharp 文档 ( https://restsharp.dev/v107/#delegating-handlers ) 中,有一个代码片段如下所示:

var options = new RestClientOptions(_server.Url) {
    ConfigureMessageHandler = handler => 
        new HttpTracerHandler(handler, new ConsoleLogger(), HttpMessageParts.All)
};
var client = new RestClient(options);

I would like to use this but I can't seem to figure out how to reference the HttpTracerHandler class.我想使用它,但我似乎无法弄清楚如何引用HttpTracerHandler类。 Am I missing something or was this just an example name of something I need to create?我是不是遗漏了什么,或者这只是我需要创建的东西的示例名称?

The documentation links to the HttpTracer repository right above the code snippet you mentioned.该文档链接到您提到的代码片段上方的 HttpTracer存储库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM