Forum: Ruby How to execute URL in ruby on rails. ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3832c46fac01379dfa5b14c60fac8b5c?d=identicon&s=25 Vikas Gholap (vikas)
on 2009-01-16 12:03
i have problem, how to excute a URL string in ruby.


Input ------>

if i provide url in textfield named "song_url" like
"www.mywebsite.com/album/1/mysongs.html".
and i click on submit button.


output ----->
it will give a string in which all html response is stored.

how i execute this url so that i process data from resulting html.
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (candlerb)
on 2009-01-16 14:13
Vikas Gholap wrote:
> if i provide url in textfield named "song_url" like
> "www.mywebsite.com/album/1/mysongs.html".
> and i click on submit button.
>
>
> output ----->
> it will give a string in which all html response is stored.

Use Net::HTTP or open-uri. Examples posted here two days ago, see
http://www.ruby-forum.com/topic/175661
This topic is locked and can not be replied to.