Log all incoming http requests.
This is useful when you want to test webhooks locally!
Run this deno command first:
deno run -r --allow-net https://gist.githubusercontent.com/marcomontalbano/58a0a074c2aec523213c460ea2f5b322/raw/http-request-logger.ts
Install ngrok and run the following command into another terminal tab:
ngrok http 8085
If you're using the custom domain feature from ngrok, you could run instead the following and avoid changing the webhook callback URL every time.
ngrok http --domain="webhooks.example.com" 8085
curl -g -X POST \
'http://localhost:8085' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer abcd1234' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "articles",
"id": "1",
"attributes": {
"title": "Hello World!"
}
}
}'