From fb6957eec9c3774a66a6a4fd0bf811c3eb082bf0 Mon Sep 17 00:00:00 2001 From: bennerv <10840174+bennerv@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:34:40 -0500 Subject: [PATCH] Add custom request-config --- pkg/util/cluster/aad.go | 7 ++++++- .../msgraph-sdk-go-core/graph_request_adapter_base.go | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/util/cluster/aad.go b/pkg/util/cluster/aad.go index dcccbf81e15..b86c0c7da62 100644 --- a/pkg/util/cluster/aad.go +++ b/pkg/util/cluster/aad.go @@ -13,12 +13,17 @@ import ( msgraph_apps "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/applications" msgraph_models "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models" msgraph_errors "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models/odataerrors" + abstractions "github.com/microsoft/kiota-abstractions-go" ) func (c *Cluster) createApplication(ctx context.Context, displayName string) (string, string, error) { appBody := msgraph_models.NewApplication() appBody.SetDisplayName(&displayName) - appResult, err := c.spGraphClient.Applications().Post(ctx, appBody, nil) + requestConfig := &msgraph_apps.ApplicationsRequestBuilderPostRequestConfiguration{ + Headers: abstractions.NewRequestHeaders(), + } + requestConfig.Headers.Add("Accept-Encoding", "Identity") + appResult, err := c.spGraphClient.Applications().Post(ctx, appBody, requestConfig) if err != nil { return "", "", err } diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_request_adapter_base.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_request_adapter_base.go index 87af7424c7a..97e9bd27bc8 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_request_adapter_base.go +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_request_adapter_base.go @@ -36,6 +36,9 @@ func NewGraphRequestAdapterBaseWithParseNodeFactoryAndSerializationWriterFactory } if httpClient == nil { httpClient = GetDefaultClient(&clientOptions) + httpClient.Transport = &nethttp.Transport{ + DisableCompression: true, + } } if serializationWriterFactory == nil { serializationWriterFactory = absser.DefaultSerializationWriterFactoryInstance