Skip to content

Instantly share code, notes, and snippets.

@Rojo
Created December 16, 2014 22:13
Show Gist options
  • Select an option

  • Save Rojo/99ef199b14ba17bdc613 to your computer and use it in GitHub Desktop.

Select an option

Save Rojo/99ef199b14ba17bdc613 to your computer and use it in GitHub Desktop.
Chain Notifications
require 'sinatra'
require 'json'
post '/' do
body = request.body.read
result = JSON.parse(body)
if result['payload']['type'] == 'address'
status(200)
body('OK\n')
else
content_type :json
status(200)
body(body)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment