class HTTP::FormData::Part
FormData::Part.new body, content_type: ‘foobar.txt; charset=“UTF-8”’
body = “Message”
@example Usage with String
Represents a body part of multipart/form-data request.
def initialize(body, content_type: nil, filename: nil)
-
filename(String) -- Value of filename parameter -
content_type(String) -- Value of Content-Type header -
body(#to_s) --
Other tags:
- Api: - public
def initialize(body, content_type: nil, filename: nil) @io = StringIO.new(body.to_s) @content_type = content_type @filename = filename end