Skip to content

Commit

Permalink
fix: removes reference to obsolete handler
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Nov 13, 2024
1 parent 42ea045 commit c79eb95
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.Graph.Cli.Core.IO;
/// <summary>
/// HTTP client factory for the graph CLI.
/// </summary>
public class GraphCliClientFactory
public static class GraphCliClientFactory
{
/// <summary>
/// Gets default middlewares.
Expand Down Expand Up @@ -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);
}
}

0 comments on commit c79eb95

Please sign in to comment.