instance method raw_post

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

raw_post()

Read the request \body. This is useful for web services that need to work with raw requests directly.

Source
# File actionpack/lib/action_controller/request.rb, line 375
    def raw_post
      unless @env.include? 'RAW_POST_DATA'
        @env['RAW_POST_DATA'] = body.read(@env['CONTENT_LENGTH'].to_i)
        body.rewind if body.respond_to?(:rewind)
      end
      @env['RAW_POST_DATA']
    end

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

Defined in ActionController::Request

Type at least 2 characters to search.

↑↓ navigate · open · esc close