Net::HTTP

The Net::HTTP class has a post_form method. However, if I create an
instance of that class (e.g., my_instance=Net::HTTP.new(‘url’,port), I
can’t seem to access the post_form method of the instance. (I would
expect that I would be able to access ‘my_instance.post_form’). Can
anyone please tell me what I am missing? Thanks for any input.

    ... doug

Hi,

On Dec 8, 2007 10:12 PM, doug [email protected] wrote:

The Net::HTTP class has a post_form method. However, if I create an
instance of that class (e.g., my_instance=Net::HTTP.new(‘url’,port), I
can’t seem to access the post_form method of the instance. (I would
expect that I would be able to access ‘my_instance.post_form’). Can
anyone please tell me what I am missing? Thanks for any input.

Net::HTTP.instance_methods.grep(/post/)
=> [“post”, “post2”, “request_post”, “enable_post_connection_check”,
“enable_post_connection_check=”]

Net::HTTP.methods.grep(/post/)
=> [“post_form”]

Which means that post_form is not an instance method of Net::HTTP but a
class method. However, there is an instace method Net::HTTP#post, which
may
be what you’re looking for.

Regards,
Michael G.