Created
December 27, 2013 15:22
-
-
Save codatory/8148488 to your computer and use it in GitHub Desktop.
HTTP Terminator and Dumper
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
require 'webrick' | |
server = WEBrick::HTTPServer.new :Port => 8000 | |
server.mount_proc '/' do |req, res| | |
puts req.inspect | |
res.body = nil | |
end | |
trap 'INT' do server.shutdown end | |
server.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment