Method: Rack::Request::Helpers#GET

Defined in:
lib/rack/request.rb

#GETObject

Returns the data received in the query string.


484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/rack/request.rb', line 484

def GET
  rr_query_string = get_header(RACK_REQUEST_QUERY_STRING)
  query_string = self.query_string
  if rr_query_string == query_string
    get_header(RACK_REQUEST_QUERY_HASH)
  else
    if rr_query_string
      warn "query string used for GET parsing different from current query string. Starting in Rack 3.2, Rack will used the cached GET value instead of parsing the current query string.", uplevel: 1
    end
    query_hash = parse_query(query_string, '&')
    set_header(RACK_REQUEST_QUERY_STRING, query_string)
    set_header(RACK_REQUEST_QUERY_HASH, query_hash)
  end
end