lib/httpx/plugins/persistent.rb in httpx-0.4.0 vs lib/httpx/plugins/persistent.rb in httpx-0.4.1

- old
+ new

@@ -13,12 +13,14 @@ # terminated by a different session, it will just retry on a new one and keep it open. # # This plugin is also not recommendable when connecting to >9000 (like, a lot) different origins. # So when you use this, make sure that you don't fall into this trap. # + # https://gitlab.com/honeyryderchuck/httpx/wikis/Persistent + # module Persistent - def self.load_dependencies(klass, *) - klass.plugin(:retries) # TODO: pass default max_retries -> 1 as soon as this is a parameter + def self.load_dependencies(klass) + klass.plugin(:retries, max_retries: 1, retry_change_requests: true) end def self.extra_options(options) options.merge(persistent: true) end