reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
Ronny Li 2021-04-08T14:17:15.071200Z

Hi everyone, I'm having trouble implementing deep-linking. So far the only thing that seems to be working is setting {:use-fragment true} but that leads to ugly URLs like <https://my.site.com/home#/new>.

...
[reitit.frontend :as rif]
[reitit.frontend.easy :as rife]

(rife/start!
   (rif/router routes)
   (fn [m] (reset! match m))
   ;; set to false to enable HistoryAPI
   {:use-fragment true})
Any ideas where I'm going wrong? I'm using Firebase hosting and I configured everything to rewrite to index.html (according to https://firebase.google.com/docs/hosting/full-config#rewrites)

rende11 2021-04-08T17:16:06.074400Z

Hello, could anyone help?

(-&gt;
   (handler {:request-method :get
             :uri            "/api/compare"
             :query-params   {:one1 "hello" :two "world"}})
   (m/decode-response-body))
;; =&gt; {:problems
;;     [{:path [],
;;       :pred "(clojure.core/fn [%] (clojure.core/contains? % :one))",
;;       :via ["app.core/compare-query-params"],
;;       :val {:two "world"},
;;       :in []}],
;;     :value {:one1 "hello", :two "world"},
;;     :type "reitit.coercion/request-coercion",
;;     :spec
;;     "(spec-tools.core/spec {:spec (clojure.spec.alpha/keys :req-un [:compare/one :compare/two]), :type :map, :leaf? false})",
;;     :coercion "spec",
;;     :in ["request" "query-params"]}
How can I transform it into human-readable response? Does reitit have any functions for this?