instance method
raw_post
Ruby on Rails 5.2.8.1
Since v3.0.20Signature
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_dispatch/http/request.rb, line 311
def raw_post
unless has_header? "RAW_POST_DATA"
raw_post_body = body
set_header("RAW_POST_DATA", raw_post_body.read(content_length))
raw_post_body.rewind if raw_post_body.respond_to?(:rewind)
end
get_header "RAW_POST_DATA"
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 311
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request