I am writing an API and it receives a JSON payload as the request body.
To get at it currently, I am doing something like this:
post \'/doSomething\'
Like this working for sinatra 1.4.5
before do if request.body.size > 0 request.body.rewind @params = ActiveSupport::JSON.decode(request.body.read) end end