On Wed, Mar 11, 2009 at 05:31:36PM -0700, Vijay wrote: > I have a strange problem with using ruby http post in shoes block. I get a > connection refused - connect(2) error on trying to run the shoes app. > I am running the program on macOS and the problem seems to be > resolve-replace.rb: line 19.
I would stay away from Net::HTTP when using Shoes. It's a blocking operation. Your whole app will stop until the request is done. Use the `download` method, which can do HTTP in the background and uses platform-specific code to work much, much faster. Shoes.app do download "http://localhost:8080", :method => "POST", :body => "userName=user&password=11111" do |dl| para dl.response.body end end You can read more in the Shoes manual. http://help.shoooes.net/App.html#download _why