Module: HTTMultiParty::Multipartable
- Included in:
- MultipartPatch, MultipartPost, MultipartPut
- Defined in:
- lib/httmultiparty/multipartable.rb
Constant Summary collapse
- DEFAULT_BOUNDARY =
'-----------RubyMultipartPost'
Instance Method Summary collapse
- #body=(value) ⇒ Object
- #boundary ⇒ Object
-
#initialize_http_header(initheader) ⇒ Object
prevent reinitialization of headers.
Instance Method Details
#body=(value) ⇒ Object
9 10 11 12 13 |
# File 'lib/httmultiparty/multipartable.rb', line 9 def body=(value) @body_parts = Array(value).map { |(k, v)| Parts::Part.new(boundary, k, v) } @body_parts << Parts::EpiloguePart.new(boundary) set_headers_for_body end |
#boundary ⇒ Object
15 16 17 |
# File 'lib/httmultiparty/multipartable.rb', line 15 def boundary DEFAULT_BOUNDARY end |
#initialize_http_header(initheader) ⇒ Object
prevent reinitialization of headers
4 5 6 7 |
# File 'lib/httmultiparty/multipartable.rb', line 4 def initialize_http_header(initheader) super set_headers_for_body end |