lib/logstash/inputs/http_poller.rb in logstash-input-http_poller-1.1.1 vs lib/logstash/inputs/http_poller.rb in logstash-input-http_poller-1.1.2

- old
+ new

@@ -16,11 +16,10 @@ # test1 => "http://localhost:9200" # test2 => { # # Supports all options supported by ruby's Manticore HTTP client # method => get # url => "http://localhost:9200/_cluster/health" -# automatic_retries => 2 # Retry the URL twice # headers => { # Accept => "application/json" # } # auth => { # user => "AzureDiamond" @@ -43,15 +42,10 @@ # } class LogStash::Inputs::HTTP_Poller < LogStash::Inputs::Base include LogStash::PluginMixins::HttpClient - # Default client options for requests - DEFAULT_SPEC = { - :automatic_retries => 0 # By default manticore retries 3 times, make this explicit - } - config_name "http_poller" default :codec, "json" # A Hash of urls in this format : "name" => "url" @@ -86,13 +80,13 @@ end private def normalize_request(url_or_spec) if url_or_spec.is_a?(String) - res = [:get, url_or_spec, DEFAULT_SPEC.clone] + res = [:get, url_or_spec] elsif url_or_spec.is_a?(Hash) # The client will expect keys / values - spec = Hash[DEFAULT_SPEC.merge(url_or_spec).map {|k,v| [k.to_sym, v] }] # symbolize keys + spec = Hash[url_or_spec.clone.map {|k,v| [k.to_sym, v] }] # symbolize keys # method and url aren't really part of the options, so we pull them out method = (spec.delete(:method) || :get).to_sym.downcase url = spec.delete(:url)