lib/httpx/adapters/faraday.rb in httpx-0.15.4 vs lib/httpx/adapters/faraday.rb in httpx-0.16.0

- old
+ new

@@ -1,7 +1,8 @@ # frozen_string_literal: true +require "delegate" require "httpx" require "faraday" module Faraday class Adapter @@ -89,15 +90,16 @@ end plugin(ReasonPlugin) end class ParallelManager - class ResponseHandler + class ResponseHandler < SimpleDelegator attr_reader :env def initialize(env) @env = env + super end def on_response(&blk) if block_given? @on_response = lambda do |response| @@ -114,19 +116,9 @@ @on_complete = blk self else @on_complete end - end - - def respond_to_missing?(meth) - @env.respond_to?(meth) || super - end - - def method_missing(meth, *args, &blk) - return super unless @env && @env.respond_to?(meth) - - @env.__send__(meth, *args, &blk) end end include RequestMixin