module Lithic::Internal::Util
def encode_multipart_streaming(body)
-
(Array(String, Enumerable
-))
Parameters:
-
body
(Object
) --
Other tags:
- Api: - private
def encode_multipart_streaming(body) ry = SecureRandom.urlsafe_base64(60) g = [] = writable_enum do |y| body ash dy.each do |key, val| case val in Array if val.all? { primitive?(_1) } val.each do |v| write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing) end else write_multipart_chunk(y, boundary: boundary, key: key, val: val, closing: closing) end d ite_multipart_chunk(y, boundary: boundary, key: nil, val: body, closing: closing) "--#{boundary}--\r\n" io = fused_enum(strio) { closing.each(&:call) } ary, fused_io]