instance method
body
Ruby on Rails 5.2.8.1
Since v3.0.20Signature
body()
The request body is an IO input stream. If the RAW_POST_DATA environment variable is already set, wrap it in a StringIO.
Source
# File actionpack/lib/action_dispatch/http/request.rb, line 322
def body
if raw_post = get_header("RAW_POST_DATA")
raw_post = raw_post.dup.force_encoding(Encoding::BINARY)
StringIO.new(raw_post)
else
body_stream
end
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 322
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request