mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Improve doc of multipart/form-data [Bug #15019]
* lib/net/http.rb: Documentation for Net::HTTP claims that multipart/form-data is not supported, but Net::HTTPHeader#set_form supports it since 1.9.3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2bfbec8745
commit
4ae20f046e
1 changed files with 2 additions and 5 deletions
|
@ -186,13 +186,10 @@ module Net #:nodoc:
|
||||||
# res.value
|
# res.value
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# At this time Net::HTTP does not support multipart/form-data. To send
|
# To send multipart/form-data use Net::HTTPHeader#set_form
|
||||||
# multipart/form-data use Net::HTTPRequest#body= and
|
|
||||||
# Net::HTTPRequest#content_type=:
|
|
||||||
#
|
#
|
||||||
# req = Net::HTTP::Post.new(uri)
|
# req = Net::HTTP::Post.new(uri)
|
||||||
# req.body = multipart_data
|
# req.set_form([['upload', File.open('foo.bar')]], 'multipart/form-data')
|
||||||
# req.content_type = 'multipart/form-data'
|
|
||||||
#
|
#
|
||||||
# Other requests that can contain a body such as PUT can be created in the
|
# 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).
|
# same way using the corresponding request class (Net::HTTP::Put).
|
||||||
|
|
Loading…
Add table
Reference in a new issue