yada 2019-10-15

if I want to return a file response, I can just return a file as the return value, but how do I set the name if I want to change it?

I now did it like this:

(-> resp
                            (assoc :body file)
                            (assoc-in [:headers "Content-Disposition"] "attachment; filename=\"filename.jpg\""))

That's right.

Would be cool to have a data description for that kind of thing.

That would be a pretty neat extension to a content negotiation system, something higher level which could generate headers or cookies.