Skip to content

Instantly share code, notes, and snippets.

@spinscale
Created February 28, 2020 16:15
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 spinscale/f0d3902df6f8eceaeff1f807ed38d9e5 to your computer and use it in GitHub Desktop.
Save spinscale/f0d3902df6f8eceaeff1f807ed38d9e5 to your computer and use it in GitHub Desktop.
Crystal webserver dumping all HTTP requests headers/bodies
crystal eval 'port = 8080 ; require "http/server"; server = HTTP::Server.new do |ctx| req = ctx.request; req.to_io STDOUT ; STDOUT.print "\n\n" if req.body end ; server.listen 8080'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment