--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: content_type
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::P 
  body: MultipartFormData facilitates in building multipart/form-data encoded messages that can be POSTed using ThinHTTP. This class is a simple wrapper around the MIME::MultipartMedia::FormData class.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Caveats
- !ruby/struct:SM::Flow::P 
  body: According to RFC 1867 and 2388, each field of the form is to be sent in the order in which it occurs in the form. However, the Hash containing the form fields inherently does not maintain order. This is probably not a problem.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Simple usage of the class
- !ruby/struct:SM::Flow::P 
  body: "The following <tt>params</tt> Hash:"
- !ruby/struct:SM::Flow::VERB 
  body: "  params = {\n    'text_field' =&gt; 'this is some text',\n    'image_field' =&gt; Pathname.new('/tmp/pic.jpg')\n  }\n"
- !ruby/struct:SM::Flow::P 
  body: "simulates the following HTML form:"
- !ruby/struct:SM::Flow::VERB 
  body: "  &lt;form&gt;\n    &lt;input type=&quot;text&quot; name=&quot;text_field&quot;/&gt;\n    &lt;input type=&quot;file&quot; name=&quot;image_field&quot;/&gt;\n  &lt;/form&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: "Creating and using a MultipartFormData instance initialized with <tt>params</tt>:"
- !ruby/struct:SM::Flow::VERB 
  body: "  fd = MultipartFormData.new(params)\n  fd.content_type   # outputs the content type header including boundary\n  fd.content        # outputs the content (multipart/form-data encoded entities)\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Constructing a multipart/form-data message and POSTing it via ThinHTTP
- !ruby/struct:SM::Flow::VERB 
  body: "  form_data = MultipartFormData.new(\n    :dog_owner =&gt; 'Mary Jane',\n    :pic_comment =&gt; 'These are my two black lab/pit mix puppies.',\n    :dog_pic1 =&gt; Pathname.new('/tmp/lexi.jpg'),\n    :dog_pic2 =&gt; Pathname.new('/tmp/simone.jpg')\n  )\n\n  th = ThinHTTP.new('petfotoz.com', 80)\n  th.post('/photo_album.cgi', form_data, form_data.content_type)\n"
constants: []

full_name: MultipartFormData
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: content
- !ruby/object:RI::MethodSummary 
  name: to_s
name: MultipartFormData
superclass: Object
