From 252ab6f8557e4ce22309e382209ebfa3171196ba Mon Sep 17 00:00:00 2001 From: Deepak Sharma Date: Sun, 18 Apr 2021 22:22:05 -0700 Subject: [PATCH] Tekton E2E (#47) * Tekton E2E * fixes --- utils/api.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/utils/api.go b/utils/api.go index 4257a26..8f0bb14 100644 --- a/utils/api.go +++ b/utils/api.go @@ -39,19 +39,18 @@ func BuildReportLink(stackID string) string { } // buildAPIURL builds API Endpoint URL -func buildAPIURL(host string, endpoint string, threeScale string) url.URL { +func buildAPIURL(host string, endpoint string, threeScale string) *url.URL { log.Debug().Msgf("Building API Url.") APIHost, err := url.Parse(host) if err != nil { log.Fatal().Err(err).Msgf("Unable to Parse Host URL") } - apiURL := url.URL{Host: APIHost.Hostname(), Path: endpoint} - apiURL.Scheme = "https" - q := apiURL.Query() + APIHost.Path = endpoint + q := APIHost.Query() q.Set("user_key", threeScale) - apiURL.RawQuery = q.Encode() + APIHost.RawQuery = q.Encode() log.Debug().Msgf("Success: Building API Url.") - return apiURL + return APIHost } // HTTPRequest is generic method for HTTP Requests to server