```ruby
require 'sinatra'
require 'cgi'
require 'json'
require 'pp'

get '/' do
  'This is a web hook!'
end

post '/' do
  pp JSON.parse(CGI.unescape(request.body.read.sub(/^payload=/, '')))
  'OK'
end
```

Use Sinatra's params rather than parsing ourselves
user
```ruby
require 'sinatra'
require 'cgi'
require 'json'
require 'pp'

get '/' do
  'This is a web hook!'
end

post '/' do
  pp JSON.parse(params[:payload])
  'OK'
end
```
assistant