Class: MultipartPost

Inherits:
Object
  • Object
show all
Defined in:
lib/mime_parts.rb

Constant Summary collapse

BOUNDARY =
"flareshow_multipart_boundary_A0n23hja"
HEADER =
{"Content-type" => "multipart/form-data, boundary=" + BOUNDARY + " "}

Class Method Summary collapse

Class Method Details

.prepare_query(params) ⇒ Object



33
34
35
36
# File 'lib/mime_parts.rb', line 33

def self.prepare_query(params)
  query = params.map {|p| "--" + BOUNDARY + "\r\n" + p.to_multipart }.join("") + "--" + BOUNDARY + "--"
  [query, HEADER]
end