This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-25
Channels
- # announcements (1)
- # beginners (338)
- # calva (41)
- # cider (19)
- # cljdoc (10)
- # cljsrn (6)
- # clojure (116)
- # clojure-europe (15)
- # clojure-italy (25)
- # clojure-nl (5)
- # clojure-spec (19)
- # clojure-uk (52)
- # clojurescript (99)
- # clojurex (14)
- # cursive (47)
- # data-science (1)
- # datomic (5)
- # duct (1)
- # figwheel (13)
- # fulcro (58)
- # graalvm (93)
- # jobs (3)
- # joker (9)
- # luminus (4)
- # nrepl (21)
- # off-topic (41)
- # pathom (25)
- # re-frame (7)
- # reitit (8)
- # ring-swagger (13)
- # tools-deps (13)
Hi, how can I ask muuntaja to kindly leave my response completely untouched? Following the wiki, I configured
(def no-response-coercion
(schema-coercion/create-coercion
(assoc schema-coercion/default-options :response nil)))
as coercion, but it's still failing to serialize e.g. a ByteArrayInputStream
provided as a response body it, so I assume I'm doing something wrong#error {
:cause "No serializer found for class java.io.ByteArrayInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)"
....}
@U0BB79MMJ by setting a Content-Type
header for example, "already formatted, don't touch" kinda hint
there is an option in Muuntaja config to set the predicate to encode the response. Hope this helps
Thanks, it helps a little, but the content will be a stream containing json data, so I don't really want to set a different one. I don't really understand why the above isn't working either
you don't have to set a different one, just having aany content-type will make Muuntaja skip encode
I rechecked the code, we do set a content type header...
#(assoc
(ok %)
:headers {"content-type" "application/json"})