Project

General

Profile

Bug #15019 ยป 0001-Clarify-that-Net-HTTP-support-multipart-form-data.patch

graywolf (Gray Wolf), 08/23/2018 12:40 PM

View differences:

lib/net/http.rb
# res.value
# end
#
# At this time Net::HTTP does not support multipart/form-data. To send
# multipart/form-data use Net::HTTPRequest#body= and
# Net::HTTPRequest#content_type=:
# To send multipart/form-data use Net::HTTPHeader#set_form
#
# req = Net::HTTP::Post.new(uri)
# req.body = multipart_data
# req.content_type = 'multipart/form-data'
# req.set_form([['upload', File.open('foo.bar')]], 'multipart/form-data')
#
# Other requests that can contain a body such as PUT can be created in the
# same way using the corresponding request class (Net::HTTP::Put).
    (1-1/1)