Hi, I'm using ring-jetty-adapter
with reitit.ring
and muuntaja
to handle json requests, but after configuring:
{:data {:muuntaja m/instance
;; :coercion schema/coercion
:middleware [ring.middleware.reload/wrap-reload
muuntaja/format-middleware
;; reitit.ring.coercion/coerce-request-middleware
;; reitit.ring.coercion/coerce-response-middleware
[wrap-deps deps]]}
and printing a request body, I'm getting
#object[org.eclipse.jetty.server.HttpInputOverHTTP 0x378295b6 "HttpInputOverHTTP@378295b6[c=36,q=0,[0]=null,s=STREAM]"]
am I doing something wrong?I should be receiving a map converted from request's json body right?
Hi @matheusashton
You can find the decoded request body in :body-params
.
From the format-middleware
docstring:
> if the :body-params
doesn't already exist. Decodes the request body into :body-params
using the :muuntaja/request
key in request
I am using muuntaja for request and response content type negotiation. Is there a built-in or recommended way to return a nice error if the content-type header is not specified or specifies an unsupported type?
Hey guys, I need some help. I’m trying to use reitit frontend, but for some reason, when I click on a link, the url updates, but the page doesn’t change. Why could that be?
This seems to work just fine, but my code won’t work. I feel like it might be obvious, but I’ve been so stumped by this problem.