This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-05
Channels
- # announcements (7)
- # babashka (61)
- # beginners (146)
- # cider (4)
- # clj-kondo (25)
- # cljsrn (29)
- # clojars (30)
- # clojure (30)
- # clojure-australia (17)
- # clojure-europe (43)
- # clojure-italy (16)
- # clojure-nl (2)
- # clojure-spec (13)
- # clojure-sweden (7)
- # clojure-uk (8)
- # clojurescript (38)
- # cursive (12)
- # datomic (42)
- # defnpodcast (2)
- # dirac (1)
- # events (5)
- # fulcro (5)
- # graalvm (43)
- # graphql (11)
- # helix (6)
- # jackdaw (13)
- # jobs (4)
- # lambdaisland (8)
- # malli (12)
- # off-topic (83)
- # pathom (9)
- # podcasts-discuss (2)
- # re-frame (6)
- # reagent (3)
- # reitit (8)
- # remote-jobs (1)
- # shadow-cljs (40)
- # vim (21)
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.