This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-23
Channels
- # beginners (20)
- # boot (7)
- # cider (115)
- # cljsrn (13)
- # clojars (1)
- # clojure (122)
- # clojure-italy (23)
- # clojure-spec (60)
- # clojurescript (74)
- # data-science (7)
- # datomic (26)
- # emacs (8)
- # graphql (1)
- # lumo (26)
- # music (1)
- # off-topic (1)
- # re-frame (9)
- # ring (3)
- # rum (1)
- # spacemacs (4)
- # uncomplicate (6)
- # vim (7)
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)
@petr.mensik That’s safe - input streams in the response body are closed for you
@weavejester Thanks 🙂