The request body is an IO input stream. If the RAW_POST_DATA environment variable is already set, wrap it in a StringIO.
Source Code
# File action_controller/cgi_process.rb, line 66 def body if raw_post = env['RAW_POST_DATA'] StringIO.new(raw_post) else @cgi.stdinput end end
<code/>and<pre/>for code samples.