In mail "[ruby-talk:17184] Re: Question on Net::HTTP"
    Dave Thomas <Dave / PragmaticProgrammer.com> wrote:

> That would certainly be very useful. However, I'm wondering if
> possibly it is a little too complex. In Python's HTTPConnectionAuth
> class, you handle this using:
> 
>     self.request(method, url, body, extra_hdrs)
>     resp = self.getresponse()
> 
> where 'method' is simply a string such as 'GET' or 'MKCOL'. Could
> Net::HTTP simply provide a low-level interface such as this?

It's not difficult. Try latest CVS version. The interface is:

  Net::HTTP.start(host) {|http|
    http.request_by_name 'GET', path [,body] [,header]
  }

I temporaliry named this method "request_by_name". Any idea?
("request" is already used.)


Minero Aoki