Slide 7
Slide 7 text
uri = URI.parse("http://example.com/path")
begin
Net::HTTP.start(uri.host, uri.port) do |http|
http.post(uri.path, URI.encode_www_form(params))
end
rescue SocketError, EOFError, IOError,
Errno::ECONNABORTED,
Errno::ECONNRESET,
Errno::EINVAL,
Errno::ETIMEDOUT,
Errno::EHOSTUNREACH,
Errno::ENETUNREACH,
Errno::ECONNREFUSED,
Errno::EPIPE
retry
end