diff --git a/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs b/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs index f080f3ae..24dd38bc 100644 --- a/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs +++ b/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs @@ -9,7 +9,7 @@ namespace Microsoft.Graph.Cli.Core.IO; /// /// HTTP client factory for the graph CLI. /// -public class GraphCliClientFactory +public static class GraphCliClientFactory { /// /// Gets default middlewares. @@ -49,24 +49,6 @@ public static HttpClient GetDefaultClient(GraphClientOptions? options = null, st m.Add(lh); } - // Set compression handler to be last (Allows logging handler to log request body) - m.Sort((a, b) => - { - var aMatch = a is Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler; - var bMatch = b is Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler; - if (aMatch && !bMatch) - { - return 1; - } - - if (bMatch && !aMatch) - { - return -1; - } - - return 0; - }); - return GraphClientFactory.Create(version: version, nationalCloud: environment.GraphClientCloud(), finalHandler: finalHandler, handlers: m); } }