Skip to content

Instantly share code, notes, and snippets.

@codatory
Created December 27, 2013 15:22
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codatory/8148488 to your computer and use it in GitHub Desktop.
HTTP Terminator and Dumper
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