From: ara.t.howard@... Date: 2007-01-19T02:00:40+09:00 Subject: Re: Reading an HTTPResponse line by line On Fri, 19 Jan 2007, Scara Maccai wrote: > 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? just give the post method a block. for instance, although google doesn't allow posting to this url harp:~ > cat a.rb require 'net/http' Net::HTTP.start 'fortytwo.merseine.nu', 80 do |http| http.post '/form.cgi', 'k=v&a=42' do |chunk| puts chunk end end harp:~ > ruby a.rb --- k: - v a: - "42" -a -- in the practice of tolerance, one's enemy is the best teacher. - the dalai lama