def prepare_multipart_data(payload)
      boundary = "infosimples" + rand(1_000_000).to_s # a random unique string

      content = []
      payload.each do |param, value|
        content << '--' + boundary
        content << "Content-Disposition: form-data; name=\"#{param}\""
        content << ''
        content << value
      end
      content << '--' + boundary + '--'
      content << ''

      [boundary, content.join("\r\n")]
    end
def prepare_multipart_data(payload)
      boundary = "infosimples" + rand(1_000_000).to_s # a random unique string

      content = []
      payload.each do |param, value|
        content << '--' + boundary
        content << "Content-Disposition: form-data; name=\"#{param}\""
        content << ''
        content << value
      end
      content << '--' + boundary + '--'
      content << ''

      [boundary, content.join("\r\n")]
    end
Prepare the multipart data to be sent via a :post_multipart request.

 @param [Hash] payload Data to be prepared via a multipart post.

 @return [String,String] Boundary and body for the multipart post.