anchor.diff:  <%- name_declaration.each do |name| -%>
   <%= name.type %> <%= name %>
   <%- end -%>
  -  attr_reader :domain, :proxy_addr, :proxy_port, :proxy_user, :proxy_password
  +  attr_reader :domain, :proxy_addr, :proxy_port, :proxy_user, :proxy_password, :request_handler
   
  -  def initialize(domain, proxy_addr: nil, proxy_port: nil, proxy_user: nil, proxy_password: nil, **options)
  -    @domain, @proxy_addr, @proxy_port, @proxy_user, @proxy_password, @interceptors, @observers, @options =
  -      domain, proxy_addr, proxy_port, proxy_user, proxy_password, [], [], DEFAULT_OPTIONS.merge(options)
  +  def initialize(domain, proxy_addr: nil, proxy_port: nil, proxy_user: nil, proxy_password: nil, request_handler: RequestHandler.new, **options)
  +    @domain, @proxy_addr, @proxy_port, @proxy_user, @proxy_password, @interceptors, @observers, @request_handler, @options =
  +      domain, proxy_addr, proxy_port, proxy_user, proxy_password, [], [], request_handler, DEFAULT_OPTIONS.merge(options)
   
       <%- interceptors.each do |interceptor| -%>
       register_interceptor(<%= interceptor %>.new)
  
positive.code:   def request(request_class, uri, body, headers, options = {})
      uri, body, headers, options = @interceptors.reduce([uri, body, headers, @options.merge(options)]) {|r, i| i.before_request(*r) }
  
      begin
        response = Net::HTTP.start(uri.host, uri.port, proxy_addr, proxy_port, proxy_user, proxy_password, options, use_ssl: (uri.scheme == HTTPS)) do |http|
          http.request request_class.new(uri, headers), body
        end
      rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
        raise NetworkError, "A network error occurred: #{e.class} (#{e.message})"
      end
  
negative.code:     uri.query = URI.encode_www_form(query) if !query.empty?
      uri
    end
  
    class RequestHandler
      def call(request_class, uri, headers, body, proxy_addr, proxy_port, proxy_user, proxy_password, options = {})
        Net::HTTP.start(uri.host, uri.port, proxy_addr, proxy_port, proxy_user, proxy_password, options, use_ssl: (uri.scheme == HTTPS)) do |http|
          http.request request_class.new(uri, headers), body
        end
      end
    end
  
    private_constant :RequestHandler
  <%- name_declaration.each do -%>
  end
  <%- end -%>
  