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

Use R default proxy settings #4

Closed
pierucci opened this issue Jul 7, 2016 · 2 comments
Closed

Use R default proxy settings #4

pierucci opened this issue Jul 7, 2016 · 2 comments

Comments

@pierucci
Copy link
Owner

pierucci commented Jul 7, 2016

Like in install.packages().

@pierucci
Copy link
Owner Author

pierucci commented Jul 8, 2016

So far the way to deal with proxy settings on MS Windows is kind of a hack:

  • using httr::GET() alone fails with a timeout error.
  • proxy settings must be passed to httr::GET().
  • proxy settings are found with curl::ie_get_proxy_for_url(), I think this only return something in MS Windows.
  • and then httr::GET() is called with those settings.

On the other hand install.packages() (actually running download.file() under the hood) uses a method argument to handle the connection settings. On MS Windows this method is automatically set to wininet, and that seems to take care of everything.

So ideally I'd like to use something similar with httr::GET() without ressorting to curl::ie_get_proxy_for_url(). But it looks like this method is specific of download.file() and I don't really see how to use it with httr::GET()...

@pierucci
Copy link
Owner Author

pierucci commented Nov 7, 2016

Rather than that messy proxy script, I'd rather refactor everything with global options. So 1 option, rgho.http_prox, that is either NULL (no proxy) or parsed in a proxy config. Stop the madness.

pierucci added a commit that referenced this issue Nov 7, 2016
pierucci added a commit that referenced this issue Nov 7, 2016
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

No branches or pull requests

1 participant