From 0c380239a973f5f4cb7c6e9d15013425fe7d5cbe Mon Sep 17 00:00:00 2001 From: Felix Boers Date: Thu, 5 Apr 2018 20:07:45 +0200 Subject: [PATCH] Override ToString() in DownstreamRequest (#301) When executing the downstreamUrlCreatorMittleware the downstream request url shoud be written to the log. But instead of the url the type name gets written because the ToString() method wasn't overriden. Now ToString() internally calls the ToUri() method in order to provide the url instead of the type name. --- src/Ocelot/Request/Middleware/DownstreamRequest.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ocelot/Request/Middleware/DownstreamRequest.cs b/src/Ocelot/Request/Middleware/DownstreamRequest.cs index 449b33cc..75070bfd 100644 --- a/src/Ocelot/Request/Middleware/DownstreamRequest.cs +++ b/src/Ocelot/Request/Middleware/DownstreamRequest.cs @@ -65,5 +65,10 @@ namespace Ocelot.Request.Middleware return uriBuilder.Uri.AbsoluteUri; } + + public override string ToString() + { + return ToUri(); + } } }