class Faraday::Retry::Middleware

def initialize(app, options = nil)

Options Hash: (**options)
  • :exhausted_retries_block (Block) -- block will receive
  • :header_parser_block (Block) -- block that will receive
  • :retry_statuses (Array) -- Array of Integer HTTP status
  • :retry_block (Block) -- block that is executed before
  • :retry_if (Block) -- block that will receive
  • :methods (Array) -- the idempotent HTTP methods
  • :exceptions (Array) -- [ Errno::ETIMEDOUT,
  • :backoff_factor (Integer) -- The amount to multiply
  • :max_interval (Integer) -- An upper limit
  • :interval_randomness (Integer) -- The maximum random
  • :interval (Integer) -- Pause in seconds between retries
  • :max (Integer) -- Maximum number of retries

Parameters:
  • options (Hash) --
  • app (#call) --
def initialize(app, options = nil)
  super(app)
  @options = Options.from(options)
  @errmatch = build_exception_matcher(@options.exceptions)
end