Sha256: 0a412a788bf3f820468dc1b76784618af4754fdcb81fa0e2df4701f1ae245c3c
Contents?: true
Size: 529 Bytes
Versions: 48
Compression:
Stored size: 529 Bytes
Contents
#encoding: utf-8 require 'rest_client' module Riemann module Babbler module Plugins module Helpers # http rest def rest_get(url) begin Timeout::timeout(plugin.timeout) do begin RestClient.get url rescue raise "Get from url: #{url} failed" end end rescue Timeout::Error raise "Get from url: #{url}, timeout error" end end end end end end
Version data entries
48 entries across 48 versions & 1 rubygems