On 10-05-20 08:01 AM, Robert Klemme wrote:
> 2010/5/20 Xeno Campanoli / Eskimo North and Gmail<xeno.campanoli / gmail.com>:
>> On 10-05-20 02:37 AM, Robert Klemme wrote:
>>>
>>> 2010/5/19 Xeno Campanoli / Eskimo North and
>>> Gmail<xeno.campanoli / gmail.com>:
>>>>
>>>> On 10-05-18 04:28 PM, Xeno Campanoli / Eskimo North and Gmail wrote:
>>>>
>>>> So, I installed rubycurl, that being the listed package of greatest
>>>> maturity, but no document I can find can seem to help me use it.  Most of
>>>> the stuff on line refers to curb or multi-curb it seems.
>>>
>>> You could also use net/http which is part of the standar library and
>>> documented:
>>>
>>> http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html
>>
>> Yes, but I am trying to move from using curl on shell to getting the same
>> functionality without the two extra forks to shell and to curl itself.  Plus
>> the native has a bad wrap, I don't know if it's deserved, but I haven't
>> found it copasetic myself.
>
> Why two forks?  In order to start curl as an external process you just
> need one fork and one exec (or use "system").  Also, why do you say
> "but"?  Net/HTTP does not need "curl" or any other external process so
> I do not see how my suggestion contradicts your goal.  On the
> contrary, I deliberately suggested to use Net/HTTP in order to _not_
> have to depend on gems or external processes.
>
> Cheers
>
> robert
>

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?

-- 
"It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member