Webhook muxer
This is a simple proof of concept that allows you to forward incoming webhooks to any number of URLs.
Installation
bundle install
Usage
- Create a file called
urls.txt
with one url per line. - Run the server:
ruby webhook-muxer.rb
- Send a webhook to the server:
curl -X POST -d '{"foo": "bar"}' http://localhost:4567/
- The server will forward the webhook payload to all urls in
urls.txt
.
Async delivery
An async delivery option is also available.
curl -X POST -d '{"foo": "bar"}' http://localhost:4567/async
The server will return a 200 status code immediately, and then deliver the webhook payload to all urls in urls.txt
asynchronously. Any errors in forwarding will not be reported in the response.