Skip to content

Instantly share code, notes, and snippets.

@jlebrech
Created July 24, 2013 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlebrech/6069251 to your computer and use it in GitHub Desktop.
Save jlebrech/6069251 to your computer and use it in GitHub Desktop.
require 'net/http'
require 'net/https'
require 'openssl'
file_path = File.expand_path(__FILE__)
path = File.dirname(file_path)
oauth_url = 'https://accounts.google.com/o/oauth2/auth'
url = URI.parse(oauth_url)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.cert = OpenSSL::X509::Certificate.new File.read path + '/google.pem'
response = http.get('https://code.google.com')
p response.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment