net-http
net-http copied to clipboard
request_get documentation - this method never raises Net::* exceptions
Hi there,
While I was reading the request_get documentation I noticed that it states: This method never raises Net::* exceptions. but looking at the code, it seems otherwise.
Also running it on irb does raises the Net::OpenTimeout. Is the doc outdated or am I missing something?
require 'net/http'
client = Net::HTTP.new('www.fakeresponse.com')
client.open_timeout = 1
client.read_timeout = 1
client.write_timeout = 1
client.request_get('/')