Got it, makes sense.
Thanks, Gary!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe
My understanding is that compojure concerns itself mostly with routing and
does not try (anymore?) to handle response maps.
Concerning ring.util.response, I think these functions are meant to be
threaded:
(-> (not-found "oh noes")
(content-type "text"))
On Wednesday, 24 February 2016, Torste
Thanks Gary!
I haven't touched the middleware stack for a while, and I only found out
about this thing when testing my routes for security.
But, if response maps are supposed to be left alone, how is
ring.util.response supposed to work, for instance the "not-found" function:
(defn not-found
"
IIRC this has always been the behaviour of compojure: if you return a
string it wraps it into a minimalist, valid Ring map, but if you return a
map it assumes it is a Ring map and leaves it alone.
There is a content-type ring middleware somewhere on the web, though in
general I don't think the con