Making an HTTPS Web Request : HTTPS « Network « Ruby






Making an HTTPS Web Request


require 'net/https'                             # => true
require 'net/http'

uri = URI.parse("https://www.yourDomain.gov/")

request = Net::HTTP.new(uri.host, uri.port)
response = request.get("/")

 








Related examples in the same category

1.Secure HTTP with HTTPS
2.Get a secure way of sending sensitive information to the remote server:
3.Set verify mode for https
4.verify_mode = OpenSSL::SSL::VERIFY_PEER