This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-27
Channels
- # announcements (5)
- # beginners (267)
- # boot (1)
- # calva (37)
- # cider (11)
- # clara (10)
- # clj-kondo (24)
- # cljsrn (13)
- # clojars (1)
- # clojure (119)
- # clojure-europe (5)
- # clojure-italy (19)
- # clojure-nl (11)
- # clojure-spec (18)
- # clojure-uk (99)
- # clojurescript (44)
- # clojurex (57)
- # community-development (6)
- # cursive (13)
- # datomic (92)
- # duct (12)
- # fulcro (1)
- # graalvm (4)
- # jobs (1)
- # kaocha (6)
- # luminus (3)
- # lumo (9)
- # off-topic (20)
- # pathom (6)
- # re-frame (21)
- # reagent (2)
- # reitit (9)
- # remote-jobs (4)
- # shadow-cljs (32)
- # spacemacs (3)
What does :bracket
syntax do?
does this answer the question? Doc PRs welcome: https://cljdoc.org/d/metosin/reitit/0.3.9/doc/basics/route-syntax
In :bracket
syntax :path-params {:id "123", :8080 ":8080"}
becomes :path-params {:id "123"}
.
Everything else is same.
@ahmed1hsn explicit :bracket
reads parameters only from brackets {id}
, not from colon :id
. By default, both are supported. Hope this helps
✔️ 4
@ikitommi exactly, that's the reason why :8080 ":8080"
is included, due to colon :8080
in route.
(require '[reitit.middleware :as middleware])
(def wrap2
(middleware/create
{:name ::wrap2
:description "Middleware that does things."
:wrap wrap}))
https://github.com/metosin/reitit/blob/0.3.9/doc/ring/data_driven_middleware.md#record
Hi, is this still a valid way of defining middleware? I can’t find middleware/create
anywhere@grzegorzrynkowski_clo good catch, no such helper reitit.middleware/map->Middleware
works. Could you update the doc?