This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-19
Channels
- # announcements (24)
- # asami (25)
- # babashka (17)
- # beginners (99)
- # bitcoin (1)
- # calva (2)
- # cider (6)
- # cljs-dev (4)
- # clojure (88)
- # clojure-australia (3)
- # clojure-europe (23)
- # clojure-france (6)
- # clojure-nl (5)
- # clojure-uk (31)
- # clojured (1)
- # clojurescript (6)
- # clojureverse-ops (1)
- # datomic (28)
- # depstar (18)
- # emacs (11)
- # events (1)
- # fulcro (21)
- # graalvm (4)
- # graphql (7)
- # heroku (1)
- # jackdaw (18)
- # joker (3)
- # kaocha (1)
- # lsp (1)
- # malli (13)
- # meander (4)
- # off-topic (12)
- # pathom (14)
- # pedestal (2)
- # podcasts-discuss (1)
- # re-frame (37)
- # reagent (17)
- # reitit (9)
- # shadow-cljs (44)
- # xtdb (17)
@franco.gasperino
It's the io.pedestal.http.impl.servlet-interceptor/WriteableBody
protocol
Once your body is a clojure.lang.IPersistentCollection
(a map?
), the protocol will be implemented as
(default-content-type [_] "application/edn")
(write-body-to-stream [o output-stream]
(let [writer (OutputStreamWriter. output-stream)]
(binding [*out* writer]
(pr o))
(.flush writer)))
It means, it there is no Content-Type
on the response headers, it will use "application/edn"
There is no default behavior in pedestal that "check the response header and use a custom write method" for the bodyThanks for the reply. I experienced the native map body as application/edn content-type in the reply as well