Fix based on Miikka’s comments

This commit is contained in:
Tommi Reiman 2018-03-22 18:57:53 +02:00
parent 1c026569d9
commit 586b02f67d

View file

@ -166,7 +166,7 @@
(some-> s
#?(:clj (URLEncoder/encode "UTF-8")
:cljs (js/encodeURIComponent))
(.replace "+" "%20")))
#?(:clj (.replace "+" "%20"))))
(defn url-decode [s]
(some-> s #?(:clj (URLDecoder/decode "UTF-8")
@ -201,9 +201,8 @@
(defn path-params
"shallow transform of the path-param values into strings"
[params]
(persistent!
(reduce-kv
(fn [m k v]
(assoc! m k (url-encode (into-string v))))
(transient {})
params)))
(assoc m k (url-encode (into-string v))))
{}
params))