Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Merge 8f029d8 into e00690e
Browse files Browse the repository at this point in the history
  • Loading branch information
armstrongli committed Nov 10, 2017
2 parents e00690e + 8f029d8 commit 6a736e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions provider_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ func (client *ProviderClient) Request(method, url string, options RequestOpts) (
}
req.Header.Set("Accept", applicationJSON)

for k, v := range client.AuthenticatedHeaders() {
req.Header.Add(k, v)
}

// Set the User-Agent header
req.Header.Set("User-Agent", client.UserAgent.Join())
Expand All @@ -185,6 +182,11 @@ func (client *ProviderClient) Request(method, url string, options RequestOpts) (
}
}

// get latest auth token
for k, v := range client.AuthenticatedHeaders() {
req.Header.Set(k, v)
}

// Set connection parameter to close the connection immediately when we've got the response
req.Close = true

Expand Down

0 comments on commit 6a736e7

Please sign in to comment.