I want to send binary data from a Sinatra application so that the user can download it as a file.
I tried using send_databut it gives me an undefined
send_data
undefined
you can just return binary data:
get '/binary' do content_type 'application/octet-stream' "\x01\x02\x03" end