Fork me on GitHub
#ring
<
2017-11-04
>
chadhs20:11:38

@weavejester thanks for your help ~last week with my wrap-content-type question. everything finally clicked for me. i know understand that i really should only return response maps (and then it’s actually easier to just use ring.util.response when i do) when i really need to, and if i just return a string compojure will build the response for me and the middleware behaves as expected 👍:skin-tone-2:

chadhs20:11:37

was a fun rollercoaster ride of “i know how to build clojure web apps → i don’t know anything → AHA!“ 😉

weavejester20:11:16

Returning response maps isn’t necessarily bad; it’s just that Compojure has a few shortcuts based on type that make things easier: https://github.com/weavejester/compojure/blob/master/src/compojure/response.clj

weavejester20:11:36

But I’m glad everything clicked for you 🙂

chadhs20:11:53

this was born of a middleware refactor; wanted to conform to wrap-defaults + wrap-file-info deprecation. starting with returning response maps was actually good for learning/understanding ring.