-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Enable proxy setting #560
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
Enable proxy setting #560
Conversation
6eab24d
to
a3e9bf9
Compare
There was a problem hiding this 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!
0cd38da
to
20ea4c6
Compare
fb46d77
to
c31c413
Compare
modules/http-helper/http_helper.go
Outdated
@@ -31,9 +31,18 @@ func HttpGet(t testing.TestingT, url string, tlsConfig *tls.Config) (int, string | |||
func HttpGetE(t testing.TestingT, url string, tlsConfig *tls.Config) (int, string, error) { | |||
logger.Logf(t, "Making an HTTP GET call to URL %s", url) | |||
|
|||
// Get a deepcopy of the default Transport implementation | |||
DefaultTransporter := http.DefaultTransport.(*http.Transport).Clone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Clone
does a deep copy, couldn't this be simplified to:
tr := http.DefaultTransport.(*http.Transport).Clone()
That would make the code more maintainable too in case http.Transport
adds new fields in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing that out.
b29a604
to
815ac0d
Compare
815ac0d
to
bd9079b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I'll kick off tests now.
Tests passed! Merging now. |
What does this PR do?
Description of task to be completed?
HTTP_PROXY
,HTTPS_PROXY
,NO_PROXY