Fork me on GitHub
#pedestal
<
2017-08-20
>
ikitommi05:08:20

Morning. I’m comparing routing libraries, bumped into this in my test data. Surely a bad practise, but I believe it should still work. Bug or intentional?

(require '[io.pedestal.http.route.definition.table :as table])
(require '[io.pedestal.http.route.map-tree :as map-tree])
(require '[io.pedestal.http.route.router :as router])

(router/find-route
  (map-tree/router
    (table/table-routes
      [["/:a" :get (constantly "") :route-name ::ping]
       ["/evil/ping" :get (constantly "") :route-name ::evil-ping]]))
  {:path-info "/evil/ping" :request-method :get})
; nil