query is a form-param

This commit is contained in:
Tommi Reiman 2018-08-01 19:43:58 +03:00
parent 077a1887cb
commit bf3fb64088
2 changed files with 3 additions and 3 deletions

View file

@ -256,9 +256,9 @@
[params] [params]
(->> params (->> params
(map (fn [[k v]] (map (fn [[k v]]
(str (url-encode (into-string k)) (str (form-encode (into-string k))
"=" "="
(url-encode (into-string v))))) (form-encode (into-string v)))))
(str/join "&"))) (str/join "&")))
(defmacro goog-extend [type base-type ctor & methods] (defmacro goog-extend [type base-type ctor & methods]

View file

@ -57,7 +57,7 @@
{:a 1} "a=1" {:a 1} "a=1"
{:a nil} "a=" {:a nil} "a="
{:a :b :c "d"} "a=b&c=d" {:a :b :c "d"} "a=b&c=d"
{:a "b c"} "a=b%20c")) {:a "b c"} "a=b+c"))
; TODO: support seq values? ; TODO: support seq values?
;{:a ["b" "c"]} "a=b&a=c" ;{:a ["b" "c"]} "a=b&a=c"