Fork me on GitHub
#reitit
<
2018-11-01
>
valerauko14:11:32

thanks i managed to get it logged!

valerauko14:11:31

on the way i noticed an issue though: if i include exception data in the response (pasted from docs), the data contains some objects that jackson can't serialize and results in an exception uncaught

valerauko14:11:47

also i'm having a really weird problem with aleph+reitit being unable to parse a request body

valerauko14:11:24

the request string (escaped to be pastable)

valerauko14:11:53

i get this as the body of a POST request

valerauko15:11:35

jsonista can parse it if i feed it manually like

user=> (json/read-value post-body
                 (json/object-mapper
                   {:encode-key-fn name
                    :decode-key-fn keyword}))

valerauko15:11:25

if i paste it to swagger and send it from there it works

valerauko15:11:22

but from the actual other service, :body-params is nil

valerauko15:11:35

the request body is the same

valerauko15:11:00

the other service is sending the request as application/ld+json and the parser doesn't recognize that as json

valerauko15:11:33

adding a wildcard matcher to muuntaja solved it #"^application/(.+\+)?json$"