Replace usage of http.DefaultClient and http.DefaultTransport (#104135)

Remove usage of http.DefaultClient and http.DefaultTransport

Part of grafana/data-sources#484
This commit is contained in:
beejeebus
2025-05-09 13:26:39 -04:00
committed by GitHub
parent 8f4b2bbece
commit 8f79e4882f
18 changed files with 120 additions and 44 deletions
@@ -11,6 +11,7 @@ import (
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/models/usertoken"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util/httpclient"
)
type gcomLogoutRequest struct {
@@ -48,7 +49,7 @@ func (s *GComSSOService) LogoutHook(ctx context.Context, user identity.Requester
hReq.Header.Add("Content-Type", "application/json")
hReq.Header.Add("Authorization", "Bearer "+s.cfg.GrafanaComSSOAPIToken)
c := http.DefaultClient
c := httpclient.New()
resp, err := c.Do(hReq)
if err != nil {
s.logger.Error("failed to send request", "error", err)