Skip to content

Commit

Permalink
Add custom request-config
Browse files Browse the repository at this point in the history
  • Loading branch information
bennerv committed Nov 8, 2023
1 parent c9124c4 commit fb6957e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/util/cluster/aad.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fb6957e

Please sign in to comment.