Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow overriding the http.Client for the http service #165

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

jsternberg
Copy link
Contributor

This allows overriding the http.Client for the http service. If the
client is overridden, the other options are ignored. This allows further
customization such as modifying the underlying http.Transport or the
CheckRedirect function.

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2020

Codecov Report

Merging #165 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
+ Coverage   82.01%   82.09%   +0.07%     
==========================================
  Files          32       32              
  Lines        2035     2044       +9     
==========================================
+ Hits         1669     1678       +9     
  Misses        247      247              
  Partials      119      119              
Impacted Files Coverage Δ
api/http/options.go 100.00% <100.00%> (ø)
internal/http/service.go 74.69% <100.00%> (-2.48%) ⬇️
options.go 92.20% <100.00%> (+0.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d53b738...2028a4e. Read the comment docs.

api/http/options.go Outdated Show resolved Hide resolved
Copy link
Contributor

@vlastahajek vlastahajek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Please, update also changelog.

options.go Show resolved Hide resolved
options.go Show resolved Hide resolved
This allows overriding the http.Client for the http service. If the
client is overridden, the other options are ignored. This allows further
customization such as modifying the underlying http.Transport or the
`CheckRedirect` function.
@vlastahajek vlastahajek merged commit 945b8fb into influxdata:master Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants