Skip to content

Commit

Permalink
Tekton E2E (#47)
Browse files Browse the repository at this point in the history
* Tekton E2E

* fixes
  • Loading branch information
Deepak Sharma authored Apr 19, 2021
1 parent 6d1e1a8 commit 252ab6f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions utils/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 252ab6f

Please sign in to comment.