Fork me on GitHub
#luminus
<
2019-09-10
>
ikitommi05:09:37

@holyjak I think you should set the content-type header to application/json too. Or you could just put :body-params to {:first-name "Bo"} to bypass the content-negotiation & body formatting step

Jakub Holý (HolyJak)08:09:26

Thanks a lot! I wouldn't have figured that out without your help. I would have expected a different behavior when the content-type is missing, getting a string or InputStream as the body, not a nil. So thank you for pointing me in the right direction!

ikitommi11:09:32

oh, the nil :body if content-negotiation doesn’t match might be a bug in Muuntaja. Please write an issue (&/ PR to fix it)

ikitommi05:09:18

the is a request pipeline differ that is good for debugging what the mw chain actually does, see https://cljdoc.org/d/metosin/reitit/0.3.9/doc/ring/transforming-middleware-chain#printing-request-diffs

❤️ 4