def call(request_env)
      request = ::Rack::Request.new(request_env)
      request_method = request_env['REQUEST_METHOD'].downcase.to_sym
      request_env['rack.input'].rewind
      request_body = request_env['rack.input'].read
      request_env['rack.input'].rewind
      request_headers = {}
      request_env.each do |k, v|
        if k.start_with?('HTTP_') && k != 'HTTP_HOST'
          name = k.sub(/\AHTTP_/, '')
          request_headers[name] = v
        end
      end
      request_headers.merge!(@persistent_headers)
      if @browser_proxy
        target_uri = request_env["REQUEST_URI"]
        connection = @target_uris.any? { |u| target_uri.start_with? u } ? @signer_connection : @unsigned_connection
        response = connection.run_request(request_method, target_uri, request_body, request_headers)
      else
        response = @connection.run_request(request_method, request.fullpath, request_body, request_headers)
      end
      response_headers = response.headers.reject do |name, _value|
        %w(Content-Length Transfer-Encoding).map(&:downcase).include?(name.downcase)
      end
      [response.status, response_headers, [response.body || '']]
    end
def call(request_env)
      request = ::Rack::Request.new(request_env)
      request_method = request_env['REQUEST_METHOD'].downcase.to_sym
      request_env['rack.input'].rewind
      request_body = request_env['rack.input'].read
      request_env['rack.input'].rewind
      request_headers = {}
      request_env.each do |k, v|
        if k.start_with?('HTTP_') && k != 'HTTP_HOST'
          name = k.sub(/\AHTTP_/, '')
          request_headers[name] = v
        end
      end
      request_headers.merge!(@persistent_headers)
      if @browser_proxy
        target_uri = request_env["REQUEST_URI"]
        connection = @target_uris.any? { |u| target_uri.start_with? u } ? @signer_connection : @unsigned_connection
        response = connection.run_request(request_method, target_uri, request_body, request_headers)
      else
        response = @connection.run_request(request_method, request.fullpath, request_body, request_headers)
      end
      response_headers = response.headers.reject do |name, _value|
        %w(Content-Length Transfer-Encoding).map(&:downcase).include?(name.downcase)
      end
      [response.status, response_headers, [response.body || '']]
    end
target_uri is the base relative to which requests are made.

 options:
 - :authenticate_responses - boolean, default true. whether responses will be authenticated.
   if this is true and an inauthentic response is encountered, then MAuth::InauthenticError
   will be raised.
 - :mauth_config - configuration passed to MAuth::Client.new (see its doc). default is
   MAuth::Client.default_config