How to parse JSON request body in Sinatra just once and expose it to all routes?
You can also use Rack Middleware to parse it. See https://github.com/rack/rack-contrib Just use Rack::PostBodyContentTypeParser
when initializing your Sinatra class.