class ActionDispatch::Request
def body
The request body is an IO input stream. If the RAW_POST_DATA environment
def body if raw_post = @env['RAW_POST_DATA'] raw_post.force_encoding(Encoding::BINARY) StringIO.new(raw_post) else @env['rack.input'] end end