instance method body

Ruby on Rails 2.2.3

Last seen in v2.2.3

Signature

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_controller/request.rb, line 426
    def body
      if raw_post = env['RAW_POST_DATA']
        raw_post.force_encoding(Encoding::BINARY) if raw_post.respond_to?(:force_encoding)
        StringIO.new(raw_post)
      else
        body_stream
      end
    end

Defined in actionpack/lib/action_controller/request.rb line 426 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::AbstractRequest

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close