Created
August 26, 2025 02:17
-
-
Save malclocke/9dc021e12d82887ac901210d74e6ea7d to your computer and use it in GitHub Desktop.
Ruby JSON webhook echo server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# Run with 'bundle exec rackup' | |
require "json" | |
require "pry" | |
run do |env| | |
request = Rack::Request.new(env) | |
Pry::ColorPrinter.pp(JSON.parse(request.body.read)) | |
[200, {}, request.body] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
source "https://rubygems.org" | |
gem "rack" | |
gem "pry" | |
gem "rackup" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment