Method: HTTPX::Connection::HTTP1#on_data

Defined in:
lib/httpx/connection/http1.rb

#on_data(chunk) ⇒ Object



120
121
122
123
124
125
126
127
128
# File 'lib/httpx/connection/http1.rb', line 120

def on_data(chunk)
  return unless @request

  log(color: :green) { "-> DATA: #{chunk.bytesize} bytes..." }
  log(level: 2, color: :green) { "-> #{chunk.inspect}" }
  response = @request.response

  response << chunk
end