Ecco il mio codice:Ruby on Rails Net :: HTTP use_ssl tiri 'metodo undefined'
sock = Net::HTTP.new(url.host, url.port)
sock.use_ssl = true
response = sock.start {|http| http.request(req)}
ecco l'errore:
undefined method `use_ssl=' for #<Net::HTTP www.paypal.com:443 open=false>
Google mi è sempre niente!
grazie.
hai qualche ulteriori informazioni su questo Net :: Pacchetto HTTPS. l'unica informazione che posso trovare suggerisce che il codice che ho sia corretto per l'impostazione di Net :: HTTP per usare HTTPS ... e.g. http://perfectionlabstips.wordpress.com/2008/11/03/how-to-open-a-ttps-session-in-ruby/ – Chris
@Chris - Non ho altre informazioni in realtà. Se guardi i documenti della ruby-library, essi mostrano che il blog che stai leggendo non è corretto. –
che cos'è ssl comunque? Come lo richiede un server? – Jwan622