Skip to content

Instantly share code, notes, and snippets.

@ream88
Created March 10, 2016 08:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ream88/73d20eb57a24b0499d73 to your computer and use it in GitHub Desktop.
Save ream88/73d20eb57a24b0499d73 to your computer and use it in GitHub Desktop.
Server which returns the request body
require 'webrick'
server = WEBrick::HTTPServer.new(Port: 8080)
server.mount_proc '/' do |req, res|
res.body = req.body
end
server.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment