lib/lusnoc.rb in lusnoc-1.0.1.70330 vs lib/lusnoc.rb in lusnoc-1.0.1.81647
- old
+ new
@@ -22,11 +22,11 @@
def configure
self.configuration ||= Lusnoc::Configuration.new
yield(configuration)
end
- def http_get(url, timeout: 1)
+ def http_get(url, timeout: 5)
uri = URI(url)
with_http(uri, timeout: timeout) do |http|
req = Net::HTTP::Get.new(uri)
@@ -34,10 +34,10 @@
yield(http, req) if block_given?
http.request(req)
end
end
- def http_put(url, value = nil, timeout: 1)
+ def http_put(url, value = nil, timeout: 5)
uri = URI(url)
data = value.is_a?(String) ? value : JSON.generate(value) unless value.nil?
with_http(uri, timeout: timeout) do |http|
req = Net::HTTP::Put.new(uri).tap do |r|