vendor/bundle/ruby/2.7.0/gems/faraday-1.3.0/lib/faraday/adapter/em_http.rb
# TODO: reuse the connection to support pipelining
reuse the connection to support pipelining
reuse the connection to support pipelining
def perform_single_request(env)
        req = create_request(env)
        req = req.setup_request(env[:method], request_config(env))
        req.callback do |client|
          if env[:request].stream_response?
            warn "Streaming downloads for #{self.class.name} " \
              'are not yet implemented.'
            env[:request].on_data.call(
              client.response,
              client.response.bytesize
            )
          end
          status = client.response_header.status
          reason = client.response_header.http_reason
          save_response(env, status, client.response, nil, reason) do |headers|
            client.response_header.each do |name, value|
              headers[name.to_sym] = value
            end
          end
        end
      end
def perform_single_request ( env ) req = create_request ( env ) req = req . setup_request ( env [ :method ] , request_config ( env ) ) req . callback do | client | if env [ :request ] . stream_response? warn "Streaming downloads for #{self.class.name} " 'are not yet implemented.' env [ :request ] . on_data . call ( client . response , client . response . bytesize ) end status = client . response_header . status reason = client . response_header . http_reason save_response ( env , status , client . response , nil , reason ) do | headers | client . response_header . each do | name , value | headers [ name . to_sym ] = value end end end end
TODO: reuse the connection to support pipelining
TODO : reuse the connection to support pipelining
env
<not_specific>