http-request-echo
http-request-echo
description
A simple crystal-lang
app to echo / inspect HTTP requests
Inspired by https://httpbin.org/anything
local
crystal http-request-echo.cr
or
DEBUG=true crystal http-request-echo.cr
requires
crystal
: https://crystal-lang.org
hot-reload
watches for changes in the first matched .cr
file and reloads it as soon as it gets updated
sh hot-reload.sh
requires
update dependencies
shards install
build binary
shards build
run binary
bin/http-request-echo
mockup-http-requests
Generate configurable mockup HTTP requests w/ random query_params & payload
sh mockup-http-requests.sh
requires
jq
: https://stedolan.github.io/jq/usr/share/dict/words
- https://random-data-api.com
tunnel
this is useful for using locally running code (or compiled binary) as a webhook
receiver for instance
ngrok http 8080
or
ngrok http --log stdout --log-format json --region eu 8080 | jq -r '.url? | select( . | contains( "https://" )? )?'
requires
ngrok
: https://ngrok.comjq
: https://stedolan.github.io/jq
heroku
https://http-request-echo.herokuapp.com
reference
reference docs & online playgrounds
bash
: https://tldp.org/LDP/abs/htmlcrystal-lang
: https://play.crystal-lang.orgheroku
: https://github.com/crystal-lang/heroku-buildpack-crystaljq
: https://jqplay.org
Repository
http-request-echo
Owner
Statistic
- 1
- 0
- 0
- 0
- 1
- almost 3 years ago
- December 9, 2021
License
Links
Synced at
Fri, 27 Dec 2024 10:37:11 GMT
Languages