Skip to content

Commit 2c2e472

Browse files
Daniel BergDaniel Berg
authored andcommitted
look for json in body, not in params
see: https://developer.github.com/webhooks/creating/#content-type “The application/json content type will deliver the JSON payload directly as the body of the POST”
1 parent 2f60b09 commit 2c2e472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/webhooks/configuring/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ setup might look something like this:
5252
require 'json'
5353

5454
post '/payload' do
55-
push = JSON.parse(params[:payload])
55+
push = JSON.parse(request.body.read)
5656
puts "I got some JSON: #{push.inspect}"
5757
end
5858

0 commit comments

Comments
 (0)