pedestal

souenzzo 2021-04-19T12:56:56.018800Z

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

Franco Gasperino 2021-04-19T16:32:38.020Z

Thanks for the reply. I experienced the native map body as application/edn content-type in the reply as well