instance method
GET
Ruby on Rails 7.2.3
Since v3.0.20Signature
GET()
Override Rack’s GET method to support indifferent access.
Source
# File actionpack/lib/action_dispatch/http/request.rb, line 388
def GET
fetch_header("action_dispatch.request.query_parameters") do |k|
rack_query_params = super || {}
controller = path_parameters[:controller]
action = path_parameters[:action]
rack_query_params = Request::Utils.set_binary_encoding(self, rack_query_params, controller, action)
# Check for non UTF-8 parameter values, which would cause errors later
Request::Utils.check_param_encoding(rack_query_params)
set_header k, Request::Utils.normalize_encode_params(rack_query_params)
end
rescue Rack::Utils::ParameterTypeError, Rack::Utils::InvalidParameterError, Rack::QueryParser::ParamsTooDeepError => e
raise ActionController::BadRequest.new("Invalid query parameters: #{e.message}")
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 388
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request