This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-08
Channels
- # announcements (13)
- # asami (9)
- # aws (1)
- # aws-lambda (1)
- # babashka (37)
- # beginners (70)
- # calva (19)
- # cider (23)
- # clara (10)
- # clj-kondo (15)
- # cljdoc (14)
- # clojure (3)
- # clojure-bay-area (1)
- # clojure-europe (40)
- # clojure-nl (3)
- # clojure-serbia (1)
- # clojure-uk (31)
- # clojuredesign-podcast (1)
- # clojurescript (9)
- # community-development (7)
- # data-oriented-programming (1)
- # datomic (44)
- # emacs (13)
- # figwheel-main (14)
- # fulcro (6)
- # jobs (6)
- # malli (15)
- # meander (7)
- # off-topic (74)
- # other-languages (1)
- # pathom (3)
- # portal (3)
- # re-frame (25)
- # reagent (6)
- # reitit (2)
- # reveal (1)
- # rewrite-clj (6)
- # ring (5)
- # shadow-cljs (11)
- # specter (7)
- # xtdb (7)
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
.
...
[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)Hello, could anyone help?
(->
(handler {:request-method :get
:uri "/api/compare"
:query-params {:one1 "hello" :two "world"}})
(m/decode-response-body))
;; => {: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?