This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-28
Channels
- # announcements (1)
- # babashka (28)
- # beginners (228)
- # cider (9)
- # clara (6)
- # clojure (66)
- # clojure-uk (13)
- # clojuredesign-podcast (5)
- # clojurescript (9)
- # core-typed (1)
- # cursive (1)
- # duct (2)
- # emacs (8)
- # fulcro (18)
- # graalvm (11)
- # hyperfiddle (1)
- # malli (2)
- # off-topic (33)
- # re-frame (9)
- # reagent (3)
- # reitit (15)
- # shadow-cljs (6)
- # tools-deps (1)
@dharrigan Have you set the Content-Type
header yourself to the response? It’s a indication to Muuntaja that you have already encoded the body and it doesn’t auto-encode it and raw Map is passed to Ring, causing a failure
just remove the header if you want Muuntaja to negotiate & auto-encode the response with the user (uses accept
and accept-charset
headers)
example swagger-api converted to malli: https://github.com/metosin/reitit/commit/3b53efc4398e68af9bfe387c66950fb5fec7c506
Ah, yes I was setting the header on the response (in the handler function). Let me try to remove it and see what happens 🙂 Thank you! (btw, really enjoying the library!)
@t95371 haven’t seen any finished tutorials but know there are few incubating by different people. Will link the those to README when/if they get done.
Quick reitit-coercion benchmarks with different coercion impls (case of two-way json-transformation & validation):
data-specs: 30.0µs
clojure-spec: 13.0µs
Plumatic Schema: 2.5µs
malli: 1.2µs
Hello, I'm really new to the usage of reitit, so sorry if my question seems naive. What I want to achieve is the routing against regular expressions. For example, if I build a router as follows:
(def router
(reitit/router
[[#"/page.*" :index]]))
I would like to handle any request that match the regex /page.*
but reitit doesn't seem to handle this:
svg-ellipse.core> (reitit.core/routes router)
[]
Is there a way to handle regex through reitit?
What I really want to achieve is a behavior similar to the website: http://www.scrumy.com/Wildcard routes maybe? https://cljdoc.org/d/metosin/reitit/0.3.10/doc/basics/route-syntax
In my case, I was thinking that /pagefoobarbaz
and /pagewibblewobble
should be valid. In what I propose, you can see page
as just a prefixe. In my ideal solution, /foobarbaz
and /wibblewobble
should be valid.
On the other hand /foobar/baz
should be invalid.
The final behavior behind this is, if the submitted url is not associated with an existant project, then a new project have to be generated and associated with this url. If the submitted url is already assigned to a project, then retrieve it.