Created
October 4, 2010 20:14
-
-
Save fd0/610340 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test.cgi: | |
/------------------------- | |
#!/usr/bin/env ruby | |
require 'cgi' | |
puts "Content-Type: text/plain" | |
puts | |
cgi = CGI.new | |
puts cgi.params.inspect | |
puts cgi.query_string.inspect | |
\------------------------ | |
$ curl -d foo=bar -i http://localhost:3000/cgi-bin/test.cgi?baaaa=bump | |
HTTP/1.1 200 OK | |
Content-Type: text/plain | |
Transfer-Encoding: chunked | |
Date: Mon, 04 Oct 2010 20:13:27 GMT | |
Server: lighttpd/1.4.28 | |
{"foo"=>["bar"]} | |
"baaaa=bump" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment