net-http
net-http copied to clipboard
Add ability to configure default settings for new connections
Closes #176.
It should be used by something like this:
Net::HTTP.default_configuration = {
read_timeout: 1,
write_timeout: 1
}
http = Net::HTTP.new(hostname)
http.open_timeout # => 60
http.read_timeout # => 1
http.write_timeout # => 1
Probably, there is a better name for the new option. And maybe we should allow more options to be configured, let me know.