简体   繁体   中英

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:

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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