This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-26
Channels
- # announcements (2)
- # aws (4)
- # babashka (5)
- # beginners (91)
- # calva (4)
- # cider (17)
- # clara (13)
- # clj-kondo (14)
- # cljsrn (11)
- # clojure (159)
- # clojure-europe (2)
- # clojure-nl (14)
- # clojure-norway (2)
- # clojure-taiwan (2)
- # clojure-uk (32)
- # clojurescript (101)
- # clojutre (4)
- # cursive (13)
- # data-science (1)
- # datomic (46)
- # emacs (68)
- # figwheel-main (5)
- # fulcro (48)
- # graalvm (7)
- # graphql (6)
- # instaparse (5)
- # joker (4)
- # lambdaisland (1)
- # leiningen (2)
- # malli (9)
- # off-topic (41)
- # pedestal (15)
- # re-frame (47)
- # reagent (7)
- # reitit (14)
- # shadow-cljs (180)
- # spacemacs (58)
- # specter (1)
- # tools-deps (13)
I've included the coercion middleware at the top level of my routes, and the :coercion
key there as well. I like that as it keeps everything in one place, at the start of the routing where it's clear. Thanks for your help!
Hi, I'm still struggling with coercion. Without the coerce-request-middleware
, everything works fine, but as soon as I add it in, the :body
, :content-type
and :content-length
of my request become nil
, and so the request fails to validate against my body spec because it's expecting a map. what have i done wrong that's stripped all the good stuff from my request?
for reference, here's my route:
["" {:get get-invitations
:post {:parameters {:body :cue/new-invitation-request}
:handler send-invitation}}]
my path params are being coerced correctly however, which is what got me into coercion to begin with
i'd rather not have to fight this. anybody know if there's a way to do path coercion without having to mess around with the request?
@conan I would start from some of the example apps. They have everything setup correctly.
also, there is the request-diff helper commented out in the router options. Uncommenting that will print what each mw does to the request/response. There should be nothing resetting the :content-type
.
no opinions in a framework means a lot of options (and ways to go wrong). http://talvi.io should be simpler, with opinions for mostly everything.
Sorry for off-topic but that list looks really interesting and I agree with most of them. Which HTTP-library would you choose if you had to replace Pohjavirta with something else?