-
Notifications
You must be signed in to change notification settings - Fork 28
add ability to use http proxy when making web requests #242
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
Conversation
c758520
to
caf582d
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.
Hi, this looks good. Can I ask for a little refactor (or I can do it if you want)? Could you create a proxy config object that holds these 4 fields instead of having them at the config manager level? Meaning the config manager holds a proxy config object rather than 4 separate fields that are very related. Thanks!
@thomaszurkan-optimizely sounds good! Happy to do the refactor. |
Does it make sense to further entrench the httparty gem via this configuration? As I opened in #211 , I think it makes sense to eliminate the gem dependency entirely and just depend on Ruby stdlib alone. (ie, net/http or open-uri) Both of the stdlib tools respect HTTP Proxy env vars out of the box and would require no configuration at all. |
I'm 100% onboard with #211. I don't think we'll entrench this gem that much further If we extract the proxy config settings to a separate config object that @thomaszurkan-optimizely mentioned above, couldn't that be used in whatever HTTP library we end up moving to? I think respecting the HTTP Proxy env var is a good approach, but I also like having the option to explicitly config the proxy in application level code. What if we have multiple proxies that we'd like switch between? @jasonkarns implementing #211 seems like a bigger chunk of work that I'm not sure I can lead, but I'm happy to pitch in if there are some smaller pieces to be worked on or at least offer some code review. |
Good call. The trick will be ensuring that we distinguish the options being unset (to allow env vars to affect), from them being intentionally set to nil (to ignore env vars and disable the proxy). |
Hi @rloomba, |
@thomasgodwell-optimizely ah sorry for letting this drag on. Yes, happy to rebase master and make those changes sometime this week. |
caf582d
to
a67d5c3
Compare
@thomasgodwell-optimizely took a pass at this refactor, let me know if you have any feedback. |
@msohailhussain and @thomaszurkan-optimizely Tested FSC Suite here #261 |
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.
Looks good. But, can we update the travis mdspell url?
.travis.yml
Outdated
@@ -43,7 +43,8 @@ jobs: | |||
install: | |||
- npm i -g markdown-spellcheck | |||
before_script: | |||
- wget --quiet https://raw.githubusercontent.com/optimizely/mdspell-config/master/.spelling | |||
# todo: change branch to master once merged. | |||
- wget --quiet https://raw.githubusercontent.com/optimizely/mdspell-config/oakbani/ignore-for-ruby/.spelling |
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.
can we merge and fix this?
Summary
HTTPProjectConfigManager
andEventDispatcher
to take in proxy config optionsI am unable to use this library as all my web requests must be routed through a web proxy.
HTTParty proxy config documentation
Issues