Here's my code:
sock = Net::HTTP.new(url.host, url.port)
sock.use_ssl = true
response = sock.start {|http| http.request(req)}
here's the error:
undefined method `use_ssl=' for #<Net::HTTP www.paypal.com:443 open=false>
google is getting me nothing!
thanks.
Require 'net/https' in addition to 'net/http'. Then use_ssl=
will be defined.
require 'net/http'
require 'net/https'
connection = Net::HTTP::new 'www.example.com'
connection.use_ssl = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With