Sinatra makes it easy to access any particular incoming form field by name:
post "/" do
params['form_field_name']
end
But how does one enumerate over all the form fields in a request? I found nothing in the documentation. I even tried
request.body.split('&')
but request.body is an instance of StringIO, and not a string.