Fork me on GitHub

@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)


malli-coercion module almost done, supports also humanized api-errors.


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!)

👍 4

Yup, that worked 🙂 Thanks!


@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
  [[#"/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:


so, things like /page/foobarbaz and /page/wibblewobble would be valid?


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.


Wildcard routes perhaps?


I'm trying it again, and let you know what's happen, thank you 🙂