cburnette / boxr

A Ruby client library for the Box Content API.
MIT License
115 stars 101 forks source link

I want user boxr with proxy server #93

Open SatoruUeda opened 4 years ago

SatoruUeda commented 4 years ago

I want to use boxr via proxy server

https://github.com/cburnette/boxr/blob/master/lib/boxr.rb#L68 Would you like to be able to specify a proxy server here

https://www.rubydoc.info/gems/httpclient/HTTPClient

  BOX_CLIENT = HTTPClient.new('http://myproxy:8080')
xhocquet commented 4 years ago

Hi @SatoruUeda , thanks for reaching out.

I agree that this feature seems reasonable, useful, and within scope of how this library queries Box for resources.. If you would like to try opening a PR, I'll happily consider it! We may also need to handle user/pass for proxies since HTTPClient supports that.

In the meantime, it seems like HTTPClient can also pick up ENV vars named HTTP_PROXY or http_proxy automatically. That might allow you to use a proxy immediately without waiting for a release.

SatoruUeda commented 4 years ago

Thank you for your consideration!