Configs and documentation
Net::HTTP automatically "[retries] idempotent request in case of Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError, Timeout::Error." The default is a one retry. Idempotent is defined as IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/
https://ruby-doc.org/stdlib-2.7.1/libdoc/net/http/rdoc/Net/HTTP.html#method-i-max_retries-3D
This pull request exposes the max_retries
method to allow overriding the default, either disabling, by setting max_retries
to 0, or increasing the number of retries.