You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: application_client.rb
    path of file: ./repos/danbooru/app/logical/danbooru/http
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# An extension to HTTP::Client that lets us write Rack-style middlewares that
# hook into the request/response cycle and override
    
      def perform(request, options)
        features = options.features.values.reverse.select do |feature|
          feature.respond_to?(:perform)
        end

        perform = proc { |req| super(req, options) }
        callback_chain = features.reduce(perform) do |callback_chain, feature|
          proc { |req| feature.perform(req, &callback_chain) }
        end

        callback_chain.call(request)
      end