Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2012 22:58
Show Gist options
  • Save anonymous/4300140 to your computer and use it in GitHub Desktop.
Save anonymous/4300140 to your computer and use it in GitHub Desktop.
Working with Faraday or some other Ruby thing and want to use the Charles Web Debugging Proxy with SSL Proxy mode turned on so that you can listen to SSL request/responses? You want something like this.
client = OAuth2::Client.new(API_CLIENT, API_SECRET, {
:authorize_url => 'https://accounts.google.com/o/oauth2/auth',
:token_url => 'https://accounts.google.com/o/oauth2/token',
# Set options that get passed on to Faraday
:connection_opts => {:proxy => { :uri => 'http://127.0.0.1:8888'} },
:ssl => {:verify => false}
})
@edward
Copy link

edward commented Dec 15, 2012

Derp. Forgot to sign in before I made this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment