Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit c79eb95

Browse files
committed
fix: removes reference to obsolete handler
Signed-off-by: Vincent Biret <[email protected]>
1 parent 42ea045 commit c79eb95

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.Graph.Cli.Core.IO;
99
/// <summary>
1010
/// HTTP client factory for the graph CLI.
1111
/// </summary>
12-
public class GraphCliClientFactory
12+
public static class GraphCliClientFactory
1313
{
1414
/// <summary>
1515
/// Gets default middlewares.
@@ -49,24 +49,6 @@ public static HttpClient GetDefaultClient(GraphClientOptions? options = null, st
4949
m.Add(lh);
5050
}
5151

52-
// Set compression handler to be last (Allows logging handler to log request body)
53-
m.Sort((a, b) =>
54-
{
55-
var aMatch = a is Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler;
56-
var bMatch = b is Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler;
57-
if (aMatch && !bMatch)
58-
{
59-
return 1;
60-
}
61-
62-
if (bMatch && !aMatch)
63-
{
64-
return -1;
65-
}
66-
67-
return 0;
68-
});
69-
7052
return GraphClientFactory.Create(version: version, nationalCloud: environment.GraphClientCloud(), finalHandler: finalHandler, handlers: m);
7153
}
7254
}

0 commit comments

Comments
 (0)