Ruby: Increase time before timeout?
I'm trying to do the following:
remote_feed = open(url)
But the remote feed t开发者_StackOverflowakes a while to return, and the call times out. I just need to increase the time until timeout occurs, is there a simple way to do this in ruby?
Thanks!
require 'open-uri'
open('http://stackoverflow.com', 'r', :read_timeout=>0.01) do |http|
http.read
end
精彩评论