This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-19
Channels
- # announcements (5)
- # beginners (68)
- # boot (1)
- # cider (27)
- # clara (11)
- # cljdoc (10)
- # clojure (129)
- # clojure-europe (2)
- # clojure-italy (16)
- # clojure-nl (15)
- # clojure-spec (74)
- # clojure-uk (31)
- # clojurescript (62)
- # core-async (17)
- # cursive (28)
- # datomic (22)
- # duct (29)
- # emacs (10)
- # fulcro (65)
- # hoplon (2)
- # hyperfiddle (16)
- # instaparse (3)
- # kaocha (2)
- # lein-figwheel (3)
- # leiningen (1)
- # mount (1)
- # nrepl (21)
- # off-topic (23)
- # re-frame (59)
- # reitit (18)
- # ring-swagger (2)
- # shadow-cljs (2)
- # spacemacs (16)
- # timbre (2)
- # tools-deps (22)
(def negotiator
(muuntaja/create
(assoc-in muuntaja/default-options
[:formats "text/html"]
(html-format/format))))
{:data {:muuntaja negotiator
:middleware [format-middleware
require-tmb-session]}})
the :muuntaja/response
key is correctly set to {:format "text/html", :charset "utf-8", :raw-format "text/html"}
but it's not injected in the response map
@vale what is your endpoint returning as :body
? by default, only collection bodies are encoded. This is quite lame imo and there is an issue for it: https://github.com/metosin/reitit/issues/122
a) you could override that default in the negotiator
b) switch-case on the negotiated content-type in a custom mw
c) let't resolve the issue