Skip to content

Instantly share code, notes, and snippets.

@bschwartz
Created May 13, 2010 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bschwartz/399903 to your computer and use it in GitHub Desktop.
Save bschwartz/399903 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
# Send your exact HTTP request back to you in the response body.
# Useful for debugging.
#
require 'proxymachine'
proxy do |data|
{:close => "HTTP/1.1 200 OK\n\n#{data}"}
end
ProxyMachine.run('endpoint', '0.0.0.0', 3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment