class ActionDispatch::Request

def raw_post

work with raw requests directly.
Read the request \body. This is useful for web services that need to
def raw_post
  unless has_header? "RAW_POST_DATA"
    set_header("RAW_POST_DATA", read_body_stream)
    body_stream.rewind if body_stream.respond_to?(:rewind)
  end
  get_header "RAW_POST_DATA"
end