Thank you sir! On Thu, Jul 8, 2010 at 7:19 PM, Frederick Cheung <frederick.che...@gmail.com > wrote:
> > > On Jul 8, 7:20 am, Ali <ali.akhtarz...@gmail.com> wrote: > > Hi, I'm trying to get a captch thing running fromhttp://textcaptcha.com/ > > which displays an XML file when you trail a key on that URL. I've > > tried this: @captcha = Net::HTTP.get_print URI.parse('http:// > > textcaptcha.com/api/8wcmmrp2tzoc0k484kkwwkwcsdbpk70q') in the > > controller of the file that I want to have access to the data, but > > nothing is displayed in the @captcha variable. If I direct my web > > browser to that URL, however, I see the correct output. > > > > I'm requiring 'net/http' and 'uri' in the controller. Am I missing > > something? > > All get_print is supposed to do is output the data to the console. > get_response will instead return a Net::HTTPResponse object which you > can play around with. > > Fred > > > > Thanks in advance. > > -- > 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-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.