Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'net/http'
- require 'net/https'
- http = Net::HTTP.new('twitter.com',443)
- http.use_ssl = true
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
- #specifying the cert location works with ruby1.8
- http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
- res = http.get("/")
- puts res.body[0,100]
- puts res.inspect
Add Comment
Please, Sign In to add comment