In every case (your way or the StringIO way) it looks to me that the 
response is parsed at the very end, so I have to wait for the whole 
response to be finished before starting using it: with 
"BufferedReader.readLine()" I use the lines as soon as they are 
available. Is there a way to do that with Ruby?



(thank you both for your answers)




> Do you mean something like:
> 
> require 'net/http'
> 
> h = Net::HTTP.new('www.ruby-lang.org', 80)
> resp, data = h.get('/index.html', nil)
> 
> data.each_line do |line|
>   puts "--> #{line}"
> end
> 
> 
>