Skip to content

Commit

Permalink
Use provided HTTP client instead when fetching root cert
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hall <jasonhall@redhat.com>
  • Loading branch information
imjasonh committed Apr 1, 2022
1 parent 56c15d6 commit 1888c99
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ func (c *client) RootCert() (*RootResponse, error) {
endpoint := *c.baseURL
endpoint.Path = path.Join(endpoint.Path, rootCertPath)

resp, err := http.Get(endpoint.String())
req, err := http.NewRequest(http.MethodGet, endpoint.String(), nil)
if err != nil {
return nil, fmt.Errorf("request: %w", err)
}
resp, err := c.client.Do(req)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1888c99

Please sign in to comment.