ring

petr.mensik 2017-07-23T16:58:57.800700Z

Is it safe to use input stream without closing like this? Or should I somehow close it after user downloads the file?

(let [response {:status 200
                  :headers {"Content-Type" (:content-type file)}
                  :body (-> (:content file)
                             io/input-stream)}]
     response)

2017-07-23T17:11:03.865178Z

@petr.mensik Thatโ€™s safe - input streams in the response body are closed for you

๐Ÿ‘ 1
petr.mensik 2017-07-23T17:16:09.890621Z

@weavejester Thanks ๐Ÿ™‚