lib/zold/http.rb in zold-0.13.31 vs lib/zold/http.rb in zold-0.13.32
- old
+ new
@@ -50,18 +50,20 @@
end
def get
http = Net::HTTP.new(@uri.host, @uri.port)
http.read_timeout = 5
+ http.open_timeout = 5
path = @uri.path
path += '?' + @uri.query if @uri.query
http.request_get(path, headers)
rescue StandardError => e
Error.new(e)
end
def put(body)
http = Net::HTTP.new(@uri.host, @uri.port)
+ http.open_timeout = 5
http.read_timeout = 10
path = @uri.path
path += '?' + @uri.query if @uri.query
http.request_put(
path, body,