This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-30
Channels
- # announcements (8)
- # babashka (73)
- # beginners (126)
- # calva (8)
- # cider (5)
- # circleci (2)
- # clara (9)
- # clj-kondo (4)
- # cljdoc (18)
- # cljfx (49)
- # clojure (51)
- # clojure-australia (3)
- # clojure-europe (41)
- # clojure-france (1)
- # clojure-nl (5)
- # clojure-norway (1)
- # clojure-russia (1)
- # clojure-uk (16)
- # clojurescript (14)
- # conjure (4)
- # cursive (5)
- # data-science (7)
- # datascript (1)
- # datavis (1)
- # datomic (13)
- # defnpodcast (2)
- # emacs (4)
- # events (2)
- # figwheel-main (7)
- # graalvm (23)
- # hoplon (2)
- # jobs (1)
- # meander (15)
- # numerical-computing (1)
- # off-topic (35)
- # pedestal (5)
- # portkey (5)
- # re-frame (19)
- # reagent (9)
- # reitit (14)
- # releases (1)
- # shadow-cljs (28)
- # sql (4)
- # tools-deps (5)
- # xtdb (7)
What do I need to add to my reitit handler or controller in order to display json? I keep getting this error:
java.lang.IllegalArgumentException: No implementation of method: :write-body-to-stream of protocol: #'ring.core.protocols/StreamableResponseBody found for class: clojure.lang.PersistentArrayMap
adding wrap-json-body
and wrap-json-response
as middleware fixed this
Consider using https://github.com/metosin/muuntaja
does/should coercion work on application/x-www-form-urlencoded
parameters? i normally see parameters like :path
and :body
merged into the request's :parameters
map, but i'm not seeing any form data there. perhaps i'm using the wrong parameters key :form-params
but i can't find in the documentation a list of valid ones; only examples of :multipart :body :path :query
["/catalogue" {:post {:parameters {:form-params {:testparam uuid?}}
:handler (fn [req]
; has uncoerced string values in a `:form-params` key:
(clojure.pprint/pprint e)
; empty map:
(r/ok {:parameters (:parameters req)}))}}]
of course i finally found it after posting my question 🙂 the key should be :form
https://github.com/metosin/reitit/blob/master/doc/coercion/coercion.md#defining-parameters
Hi, I am trying to use Reitit in the browser and I have this route:
["/new-incident" {:name ::new-incident :view new-incident}]
but for some reason it doesn't know what to do... the second line is in a different name-space, not sure if that matters though.
ns: "app.components.button", name: "new-incident", fqn: "app.components.button/new-incident"
@thomas Yes, that matters if you are using namespaced keywords. Use :route.ns.here/new-incident on the href call.