Hi,
You need to include the ssl part as well.
Julian.
On 14/10/2007, at 8:02 PM, Stefano Grioni wrote:
>
> Hello,
>
> I need to get the HTML content of a website which can be accessed by
> HTTPS.
> I tried to use
>
> require ''net/http''
>
> uri="https://website.com"
> url = URI.parse(uri)
> req = Net::HTTP::Get.new(url.path)
> https = Net::HTTP.new url.host, url.port
> https.use_ssl true
> res = https.start {|http|
> http.request(req)
> }
> puts res.body
>
> But I get an error saying that use_ssl is not defined in class
> Net:HTTP
> (even if the documentation says other way).
>
> Does anyone know what''s wrong?
>
> Thanks
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---