method
body
rails latest stable - Class:
ActionController::AbstractRequest
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v2.2.1) is shown here.
body()public
The request body is an IO input stream. If the RAW_POST_DATA environment variable is already set, wrap it in a StringIO.
# File actionpack/lib/action_controller/request.rb, line 418
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 Related methods
- Instance methods
- accepts
- body
- body_stream
- cache_format
- content_length
- content_type
- cookies
- delete?
- domain
- etag_matches?
- format
- format=
- fresh?
- get?
- head?
- headers
- host
- host_with_port
- if_modified_since
- if_none_match
- method
- not_modified?
- parameters
- path
- path_parameters
- path_parameters=
- port
- port_string
- post?
- protocol
- put?
- query_parameters
- query_string
- raw_host_with_port
- raw_post
- referer
- referrer
- remote_addr
- remote_ip
- request_method
- request_parameters
- request_uri
- reset_session
- server_software
- session
- session=
- ssl?
- standard_port
- subdomains
- symbolized_path_parameters
- template_format
- url
- xhr?
- xml_http_request?
- Class methods
- relative_url_root=
- Protected methods
-
content_type_with_parameters -
content_type_without_parameters - Private methods
-
clean_up_ajax_request_body! -
extract_content_type_without_parameters -
extract_multipart_boundary -
get_typed_value -
parse_multipart_form_parameters -
parse_query_parameters -
parse_request_parameters -
read_multipart -
content_type_from_legacy_post_data_format_header -
named_host? -
parse_formatted_request_parameters