Use global HTTP client whenever applicable (#2682)

This commit is contained in:
Harshavardhana
2023-02-27 17:19:56 -08:00
committed by GitHub
parent 372852ee86
commit dd913decc6
9 changed files with 40 additions and 58 deletions

View File

@@ -19,7 +19,6 @@ package restapi
import (
"os"
"github.com/minio/console/pkg/http"
"github.com/minio/console/pkg/subnet"
)
@@ -45,10 +44,7 @@ func (sp SubnetPlan) String() string {
var InstanceLicensePlan = PlanAGPL
func fetchLicensePlan() {
client := &http.Client{
Client: GetConsoleHTTPClient(""),
}
licenseInfo, err := subnet.ParseLicense(client, os.Getenv(EnvSubnetLicense))
licenseInfo, err := subnet.ParseLicense(GetConsoleHTTPClient(""), os.Getenv(EnvSubnetLicense))
if err != nil {
return
}