WebHook to WebSocket bridge
- Rust 76.1%
- Shell 13.6%
- JavaScript 7.1%
- Dockerfile 3.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| test_client | ||
| .gitignore | ||
| build-container.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
Webhook to Websocket bridge
This bridge lets you listen to JSON WebHooks over a WebSocket on the same URL.
Example
- You can either run the executable directly or use
docker compose up. - Connect your WebSocket to
ws://localhost:8080/my-personal-webhook. - Then, trigger the WebHook at
http://localhost:8080/my-personal-webhook:
curl -X POST -H 'Content-Type: application/json' -d '{"foo":"bar!", "baz": 42}' http://localhost:8080/my-personal-webhook
Resonite
Since Resonite does not support JSON parsing natively yet, WebSockets connecting with a Resonite User Agent will receive the same data in a key-value URL-escaped encoding:
| JSON | Resonite |
|---|---|
{"foo":"bar?!", "baz": 42} |
baz=42 foo=bar%3F! |
[1,"two",3] |
1 two 3 |