C
Caleb Mei
Hi All,
Newbie here, on XP with Ruby 1.8.6.25, I am trying to post a request to
an external service basic HTTP/XML Form Post. I have tried multiple
test, but getting this error,
Errno::ECONNRESET (An existing connection was forcibly closed by the
remote host.):
c:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `sysread'
c:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
The code,
url = URI.parse('http://www.yahoo.com') # not working
url = URI.parse('http://localhost:8080/default.txt') # working fine
http = Net::HTTP.new(url.host)
puts "===== Begin ======"
puts url.path
puts url.host
puts url.port
res = Net::HTTP.start(url.host, url.port) {|http|
http.get('/index.htm')
}
puts res.body
@result = res.body
puts "===== End ======"
No proxy. Downloading 1.8.5 to give it a try.
Anyone experience similar issue? Recommendation to use other library to
make HTTP/XML call?
Really appreciated!
Cheers,
Calebmei
Newbie here, on XP with Ruby 1.8.6.25, I am trying to post a request to
an external service basic HTTP/XML Form Post. I have tried multiple
test, but getting this error,
Errno::ECONNRESET (An existing connection was forcibly closed by the
remote host.):
c:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `sysread'
c:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
The code,
url = URI.parse('http://www.yahoo.com') # not working
url = URI.parse('http://localhost:8080/default.txt') # working fine
http = Net::HTTP.new(url.host)
puts "===== Begin ======"
puts url.path
puts url.host
puts url.port
res = Net::HTTP.start(url.host, url.port) {|http|
http.get('/index.htm')
}
puts res.body
@result = res.body
puts "===== End ======"
No proxy. Downloading 1.8.5 to give it a try.
Anyone experience similar issue? Recommendation to use other library to
make HTTP/XML call?
Really appreciated!
Cheers,
Calebmei