Skip to content

Instantly share code, notes, and snippets.

@mbeale
Created October 18, 2013 17:21
Show Gist options
  • Save mbeale/7044836 to your computer and use it in GitHub Desktop.
Save mbeale/7044836 to your computer and use it in GitHub Desktop.
Easypost webhook with sinatra
require 'easypost'
require 'sinatra'
require 'json'
post '/webhook' do
e = EasyPost::Event.new
e.receive(JSON.parse(request.body.string))
e.result.to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment