From 0d7998e0f6f5f96ec5cf4f8d5ec3f3108c96bc30 Mon Sep 17 00:00:00 2001 From: atavism Date: Mon, 17 Jun 2024 18:29:13 -0700 Subject: [PATCH] set application/x-protobuf content type on auth client --- internalsdk/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internalsdk/auth/auth.go b/internalsdk/auth/auth.go index bc64461f0..acf1d67e2 100644 --- a/internalsdk/auth/auth.go +++ b/internalsdk/auth/auth.go @@ -52,7 +52,7 @@ func NewClient(baseURL string, opts *webclient.Opts) AuthClient { httpClient = &http.Client{} } webclient := webclient.NewRESTClient(defaultwebclient.SendToURL(httpClient, baseURL, func(client *resty.Client, req *resty.Request) error { - req.SetHeader(common.ContentType, "application/json") + req.SetHeader(common.ContentType, "application/x-protobuf") if req.RawRequest.URL != nil && strings.HasPrefix(req.RawRequest.URL.Path, "/users/salt") { // for the /users/salt, we do not need to set any headers so return right away return nil