lily
2008-Apr-10 09:44 UTC
Can ruby support send http request or call other programs written in like c or c# or Java?
hello, everyone, I am developping a website using Ruby on Rails which need to go to another website to get some information to update my own database. Does ruby have similar function support like in c#:WebRequest.Create Request.GetResponse(); And how I call other programs in Rails? Many thanks, Lily --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
lily
2008-Apr-10 09:44 UTC
Can ruby support send http request or call other programs written in like c or c# or Java?
hello, everyone, I am developping a website using Ruby on Rails which need to go to another website to get some information to update my own database. Does ruby have similar function support like in c#:WebRequest.Create Request.GetResponse(); And how I call other programs in Rails? Many thanks, Lily --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Apr-10 10:27 UTC
Re: Can ruby support send http request or call other programs written in like c or c# or Java?
On 10 Apr 2008, at 10:44, lily wrote:> > hello, everyone, > I am developping a website using Ruby on Rails which need to go to > another website to get some information to update my own database. > Does ruby have similar function support like in c#:WebRequest.Create > Request.GetResponse(); > And how I call other programs in Rails?Have you looked at Net:HTTP ? Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thorsten Mueller
2008-Apr-10 10:30 UTC
Re: Can ruby support send http request or call other program
Ruby Net::HTTP class would support such requests http://www.ruby-doc.org/core/classes/Net/HTTP.html there are some other classes/gems that are worth looking at: net/http net/https for secure connections openssl open-uri hpricot especially hpricot is very handy if you have to process the returned html or xml -- 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 -~----------~----~----~----~------~----~------~--~---
Mike Nicholaides
2008-Apr-12 21:10 UTC
Re: Can ruby support send http request or call other program
Off the top of my head, open-uri may do what you need, if it''s really quick and simple. http://www.juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/ -- 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 -~----------~----~----~----~------~----~------~--~---