Skip to content

Instantly share code, notes, and snippets.

@progapandist
Created February 26, 2021 10:29
Show Gist options
  • Save progapandist/05f354b3c93c116bf376361fe76caf0a to your computer and use it in GitHub Desktop.
Save progapandist/05f354b3c93c116bf376361fe76caf0a to your computer and use it in GitHub Desktop.
require 'sinatra'
post '/*' do
puts JSON.pretty_generate(request.env)
puts request.body.read
end
put '/*' do
puts JSON.pretty_generate(request.env)
puts request.body.read
end
get '/*' do
env = JSON.pretty_generate(request.env)
body = request.body.read
puts env # log
puts body
env + "\n" + body
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment