We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53b4a42 commit 845eacdCopy full SHA for 845eacd
lib/cgi/core.rb
@@ -384,11 +384,14 @@ def print(*options)
384
stdoutput.print(*options)
385
end
386
387
- # Parse an HTTP query string into a hash of key=>value pairs.
+ # :call-seq:
388
+ # CGI.parse(query_string) -> hash
389
+ #
390
+ # Returns a new hash built from name/value pairs in the given +query_string+:
391
#
- # params = CGI.parse("query_string")
- # # {"name1" => ["value1", "value2", ...],
- # # "name2" => ["value1", "value2", ...], ... }
392
+ # query = 'foo=0&bar=1&foo=2&bar=3'
393
+ # CGI.parse(query)
394
+ # # => {"foo" => ["0", "2"], "bar" => ["1", "3"]}
395
396
def self.parse(query)
397
params = {}
0 commit comments