Sha256: 2c39e3b032609a72357875655cecb50e609baf3f330465ddfc262db54bf9f5db

Contents?: true

Size: 644 Bytes

Versions: 75

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true
module Excon
  module Middleware
    class Base
      # Returns the list of parameters that this middleware uses that are valid
      # as arguments to `Connection#request` or `Connection#new`.
      def self.valid_parameter_keys
        []
      end

      def initialize(stack)
        @stack = stack
      end

      def error_call(datum)
        # do stuff
        @stack.error_call(datum)
      end

      def request_call(datum)
        # do stuff
        @stack.request_call(datum)
      end

      def response_call(datum)
        @stack.response_call(datum)
        # do stuff
      end
    end
  end
end

Version data entries

75 entries across 73 versions & 3 rubygems

Version Path
excon-1.2.1 lib/excon/middlewares/base.rb
excon-1.2.0 lib/excon/middlewares/base.rb
excon-1.1.1 lib/excon/middlewares/base.rb
excon-1.1.0 lib/excon/middlewares/base.rb
excon-1.0.0 lib/excon/middlewares/base.rb
excon-0.112.0 lib/excon/middlewares/base.rb
excon-0.111.0 lib/excon/middlewares/base.rb
excon-0.110.0 lib/excon/middlewares/base.rb
excon-0.109.0 lib/excon/middlewares/base.rb
excon-0.108.0 lib/excon/middlewares/base.rb
excon-0.107.0 lib/excon/middlewares/base.rb
excon-0.106.0 lib/excon/middlewares/base.rb
excon-0.105.0 lib/excon/middlewares/base.rb
excon-0.104.0 lib/excon/middlewares/base.rb
excon-0.103.0 lib/excon/middlewares/base.rb
excon-0.102.0 lib/excon/middlewares/base.rb
excon-0.101.0 lib/excon/middlewares/base.rb
excon-0.100.0 lib/excon/middlewares/base.rb
excon-0.99.0 lib/excon/middlewares/base.rb
excon-0.98.0 lib/excon/middlewares/base.rb