Method: ActionDispatch::Request#body
- Defined in:
- actionpack/lib/action_dispatch/http/request.rb
#body ⇒ Object
The request body is an IO input stream. If the RAW_POST_DATA environment variable is already set, wrap it in a StringIO.
357 358 359 360 361 362 363 364 |
# File 'actionpack/lib/action_dispatch/http/request.rb', line 357 def body if raw_post = get_header("RAW_POST_DATA") raw_post = (+raw_post).force_encoding(Encoding::BINARY) StringIO.new(raw_post) else body_stream end end |