[Ironruby-core] Net/http post_form problem

Shay Friedman lists at ruby-forum.com
Sat Jun 6 04:33:58 EDT 2009


I'm trying to execute the next code:
require 'net/http'
require 'uri'

puts "starting..."
url = URI.parse('http://localhost/test3/demo.aspx')

puts "retrieving..."
res = Net::HTTP.post_form(url,
                          {"FullName" => "Shay Friedman"})

puts "writing"
File.open("test.txt","w") { |file| file.print res.body }

It uses the net/http library to send a post request to the given web
site. The problem is that it gets a timeout every single time on the
post_form method.

I have tried to put a breakpoint on the Page_Load event of the demo.aspx
code and the breakpoint is never hit!
I tried this code sample using MRI and it worked great...

Is it a bug?


The error I receive after waiting for quite a long time:
Posted via http://www.ruby-forum.com/.

More information about the Ironruby-core mailing list