Hi,
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?
Thanks,
Shay
-------------
http://www.ironshay.com
The error I receive after waiting for quite a long time:
--
Posted via http://www.ruby-forum.com/.
It wouldn''t surprise me if there is a bug. If you look at the Mspec tags, you''ll see that a lot of the net/http library is critical (meaning it hangs or crashes the interpreter). Feel free to file a bug, or take a look to start cleaning it up (if the SOAP stuff isn''t already keeping you busy ;)) JD ...there is no try> -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Saturday, June 06, 2009 1:34 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Net/http post_form problem > > Hi, > > 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? > > Thanks, > Shay > ------------- > http://www.ironshay.com > > > The error I receive after waiting for quite a long time: > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core
It might be related to the spec that is failing:
library\net\http\http\post_form_spec.rb
critical:Net::HTTP.post_form when passed URI POSTs the passed form data to the
given uri
I''ve filed a bug:
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1529
Tomas
-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Shay Friedman
Sent: Saturday, June 06, 2009 1:34 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Net/http post_form problem
Hi,
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?
Thanks,
Shay
-------------
http://www.ironshay.com
The error I receive after waiting for quite a long time:
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core