class Excon::Connection
def response_call(datum)
def response_call(datum) if datum.has_key?(:response_block) && !datum[:response][:body].empty? content_length = remaining = datum[:response][:body].bytesize while remaining > 0 datum[:response_block].call(datum[:response][:body].slice!(0, [datum[:chunk_size], remaining].min), [remaining - datum[:chunk_size], 0].max, content_length) remaining -= datum[:chunk_size] end end datum end