class Typhoeus::EasyFactory

def set_read_callback(body)

Returns:
  • (Ethon::Easy) - The easy.

Parameters:
  • body (String/File) -- The body read by the readfunction.
def set_read_callback(body)
  easy.infilesize_large =
    if body.respond_to?(:bytesize)
      body.bytesize
    elsif body.respond_to?(:size)
      body.size
    end
  easy.upload = true
  easy.set_read_callback(body)
  easy
end