From: z Date: 2006-11-04T11:55:07+09:00 Subject: Re: Using another program (Lynx) from within Ruby Jan Svitok wrote: > the #{} should work. Try replacing the command with echo to see to > what exactly it is expanded. > > On a side note, you can use Net::HTTP for this task without calling > external program: > (from rdoc): > > response = nil > Net::HTTP.start('some.www.server', 80) {|http| > response = http.get('/index.html') > } > p response['content-type'] > p response.body I tried using Net::HTTP but I'm not sure how to get the HTTP response code. I tried the following and don't see the response code (200, 301, 302, etc.) -- sorry I might not have mentioned that I only need the response code. I'm going to try to use Net::HTTP because I saw that it can follow redirects. That would be useful. Not enough info here: response.each {|key, value| puts "#{key} is #{value}\n\n}