From: Eric Hodel Date: 2010-05-21T11:30:02+09:00 Subject: Re: curl library? On May 20, 2010, at 10:45, Xeno Campanoli / Eskimo North and Gmail wrote: > Among other things we have built the tool around curl facilities like the --trace-time function, and we don't want to mix in new stuff, or add variations in the kind of data we get. Also, all the switches for handling post data, HTTP headers, cookies, etc are working well, and it's not clear you can do all of those things, let alone in a reasonably good way, with the net/http. I am certainly interested in your opinion on that. > > Curl registers timestamps for points before the socket connection, as well as for receipt of each of the important HTTP headers, and then after the HTTP protocol activities are over the closure steps. Can I get that from net/http? Yes. Here's some pseudocode: h = Net::HTTP.new h.start do p :connected! h.request do |r| p :headers! r.read_body p :body! end end