Skip to content

Commit 252ab6f

Browse files
author
Deepak Sharma
authored
Tekton E2E (#47)
* Tekton E2E * fixes
1 parent 6d1e1a8 commit 252ab6f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

utils/api.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,18 @@ func BuildReportLink(stackID string) string {
3939
}
4040

4141
// buildAPIURL builds API Endpoint URL
42-
func buildAPIURL(host string, endpoint string, threeScale string) url.URL {
42+
func buildAPIURL(host string, endpoint string, threeScale string) *url.URL {
4343
log.Debug().Msgf("Building API Url.")
4444
APIHost, err := url.Parse(host)
4545
if err != nil {
4646
log.Fatal().Err(err).Msgf("Unable to Parse Host URL")
4747
}
48-
apiURL := url.URL{Host: APIHost.Hostname(), Path: endpoint}
49-
apiURL.Scheme = "https"
50-
q := apiURL.Query()
48+
APIHost.Path = endpoint
49+
q := APIHost.Query()
5150
q.Set("user_key", threeScale)
52-
apiURL.RawQuery = q.Encode()
51+
APIHost.RawQuery = q.Encode()
5352
log.Debug().Msgf("Success: Building API Url.")
54-
return apiURL
53+
return APIHost
5554
}
5655

5756
// HTTPRequest is generic method for HTTP Requests to server

0 commit comments

Comments
 (0)