Sha256: 7d9fd5dfd42a5f4ea560aacad3c657e958527a47f8b0ca4ae85b9fed58036d26
Contents?: true
Size: 360 Bytes
Versions: 3
Compression:
Stored size: 360 Bytes
Contents
#!/usr/bin/env ruby require 'sinatra' require 'json' set :port, 5000 post '/event' do status 204 #successful request with no body content request.body.rewind p request_payload = JSON.parse(request.body.read) #append the payload to a file File.open("spec/#{request_payload["filename"]}", "a") do |f| f.puts(request_payload["data"]) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pingpongpairing-0.1.4 | exe/webhook |
pingpongpairing-0.1.3 | exe/webhook |
pingpongpairing-0.1.1 | exe/webhook |