Skip to content

Instantly share code, notes, and snippets.

@bridgethillyer
Created January 24, 2016 21:09
Show Gist options
  • Save bridgethillyer/b2529b035b693674c5c5 to your computer and use it in GitHub Desktop.
Save bridgethillyer/b2529b035b693674c5c5 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'JSON'
post '/bridget-fn' do
request.body.rewind
b = request.body.read
stuff = JSON.parse(b)
stuff["n"] = stuff["n"] + 1
JSON.generate(stuff)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment