Skip to content

Commit

Permalink
Fixed order of host completion (#233)
Browse files Browse the repository at this point in the history
Follow-up to #230
  • Loading branch information
nfx authored Dec 8, 2022
1 parent f454229 commit 52f2094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (c *DatabricksClient) unmarshall(path string, body []byte, response interfa
return json.Unmarshal(body, &response)
}

func (c *DatabricksClient) completeUrl(r *http.Request) error {
func (c *DatabricksClient) addHostToRequestUrl(r *http.Request) error {
if r.URL == nil {
return fmt.Errorf("no URL found in request")
}
Expand Down Expand Up @@ -226,8 +226,8 @@ func (c *DatabricksClient) perform(ctx context.Context, method, requestURL strin
return nil, fmt.Errorf("request marshal: %w", err)
}
visitors = append([]func(*http.Request) error{
c.completeUrl,
c.Config.Authenticate,
c.addHostToRequestUrl,
c.addAuthHeaderToUserAgent,
}, visitors...)
resp, err := retries.Poll(ctx, c.retryTimeout,
Expand Down

0 comments on commit 52f2094

Please sign in to comment.