This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-21
Channels
- # babashka (16)
- # beginners (182)
- # calva (13)
- # chlorine-clover (43)
- # clj-kondo (17)
- # cljs-dev (14)
- # cljsrn (19)
- # clojure (97)
- # clojure-argentina (7)
- # clojure-dev (45)
- # clojure-europe (7)
- # clojure-germany (5)
- # clojure-nl (4)
- # clojure-portugal (4)
- # clojure-romania (5)
- # clojure-spec (46)
- # clojure-uk (21)
- # clojuredesign-podcast (2)
- # clojurescript (159)
- # conjure (28)
- # core-async (7)
- # cursive (13)
- # datomic (17)
- # defnpodcast (9)
- # duct (1)
- # fulcro (45)
- # graphql (6)
- # jobs (7)
- # jobs-discuss (1)
- # juxt (3)
- # kaocha (4)
- # leiningen (12)
- # malli (5)
- # observability (1)
- # off-topic (50)
- # pathom (15)
- # re-frame (16)
- # reitit (5)
- # remote-jobs (21)
- # ring (7)
- # shadow-cljs (166)
- # test-check (6)
- # tools-deps (27)
- # xtdb (2)
If anyone has any ideas about what’s going on in https://clojurians.slack.com/archives/C053AK3F9/p1587420276364400 your help would be much appreciated. (I won’t be able to check this until tomorrow but really any help or ideas or speculations are welcome; I spent way too long on this today and will rewrite this thing in something else if I can’t figure this out soon. It’s a stock luminus template.)
@jaime.sangcap body coercion depends on the content-type. For json, an json-transformer is used. JSON can present numbers, so no string->number is not enabled. For EDN and Transit, no type coercion is applied, as anything can be presented with it. If you want to do string->numbers etc, you can create a custom coercion with different options. Just swap the json-transformer
into string-transformer
for "application/json"
and you are done. Here’s the relevant config: https://github.com/metosin/reitit/blob/master/modules/reitit-spec/src/reitit/coercion/spec.cljc#L76-L81. Hope that helps.
@ikitommi Thanks for the reference! I'll look more into custom transformer of spec-tools today
What's the reason reitit tries to be compatible with every clojure web abstraction out there? ring/middleware, ring with interceptors, pedestal, how does one pick from the options?
@kaxaw75836 curiosity? It’s kinda “library for creating web-frameworks”. Planned forever to push out a developer-friednly opinionated stack (with good defaults). Currently, just copy&pasting the template from project to another. Here’s a placeholder: https://talvi.io/