Method: Net::HTTPGenericRequest#body_stream

Defined in:
lib/net/http/generic_request.rb

#body_streamObject

Returns the body stream object for the request, or nil if there is none:

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>


169
170
171
# File 'lib/net/http/generic_request.rb', line 169

def body_stream
  @body_stream
end