Fork me on GitHub

Does anyone have a link with info on how to serve something as .csv file from data created within a function as download (app uses ring and sibiro). I'm getting as far as that I can click a button on the webpage, the data gets pulled from the database, gets converted to csv and then I can only create a local csv file. I want the app to send it to my browser as download. I've been searching the web for about an hour now and came up quite empty


looked at that, but that requires a static file?


im now getting as far that a csv file is served, just has no content yet 🙂


> and then I can only create a local csv file. I thought you had a file. If you have it in memory, then maybe it is just a matter of setting the right Content-Type header.


Got a bit further, It's pooping out a csv file for me but it containts the complete response {:status 200, :headers {"Content-Type" "text/csv"}, :body "csvbodydatahere"}


got it to work


didnt know how to handle the outputstream, gotta love stackoverflow