ring

chadhs 2017-11-04T20:41:38.000066Z

@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:

2017-11-04T20:42:29.000006Z

@chadhs You’re welcome

chadhs 2017-11-04T20:43:37.000013Z

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

2017-11-04T20:44:16.000005Z

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

2017-11-04T20:44:36.000058Z

But I’m glad everything clicked for you 🙂

chadhs 2017-11-04T20:46:53.000016Z

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.

chadhs 2017-11-04T20:47:06.000054Z

cheers!