You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ export SECRET_TOKEN=123
$ gem install sinatra json logger
$ ruby hook.rb
...
== Sinatra (v2.1.0) has taken the stage on 4567 for development with backup from WEBrick
[2021-12-22 19:04:46] INFO WEBrick::HTTPServer#start: pid=42766 port=4567
Send the following request to the hook URL, and should get a successful response.
$ curl -v --location --request POST 'http://localhost:4567/payload' \
--header 'X-Hub-Signature-256: sha256=18ff659918e341fa71ab5b0698521615f6337aaade7537d0f836bec8a1123621' \
--header 'Content-Type: application/json' \
--data-binary '@./payload.json'
* Connected to localhost (127.0.0.1) port 4567 (#0)
> POST /payload HTTP/1.1
> Host: localhost:4567
...
< HTTP/1.1 200 OK
< Content-Type: text/html;charset=utf-8
< Content-Length: 319
...
I got some JSON: {...}