Skip to content
instance method

Net::HTTPGenericRequest#body_stream=

(untyped body_stream) -> untyped
body_stream=(input)

Sets the body stream for the request:

Example
req = Net::HTTP::Post.new(uri)          # => #<Net::HTTP::Post POST>
req.body_stream                         # => nil
require 'stringio'
req.body_stream = StringIO.new('xyzzy') # => #<StringIO:0x0000027d1e5affa8>
req.body_stream                         # => #<StringIO:0x0000027d1e5affa8>
See also #body= #inspect #pretty_print also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0