You can clone with
HTTPS or Subversion.
in my environment I needed to process a PUT request which has a JSON payload in its body (but it's not POST request, so I can't access that payload easily).
I found the solution at http://mini.softwareas.com/posting-json-to-a-sinatra-mongodb-service in which the guy also describes that it wasn't easy to find out; especially it's not obvious that there's a request object available (it may be by skimming through the tutorial, but what I mean is that it's not explicitly told albeit still very useful).
Anyway, it boils down to that with the following code
put '/test' do
data = JSON.parse( request.body.read.to_s )
Only is able to easily access it (once you find out). It would be nice to document this inside the tutorial!