mention sources

This commit is contained in:
Tommi Reiman 2018-08-01 19:51:54 +03:00
parent ebecb7ee12
commit 7389838b59
2 changed files with 7 additions and 1 deletions

View file

@ -163,7 +163,7 @@
(->> m (remove (comp nil? second)) (into {})))
;;
;; Path-parameters, see https://github.com/metosin/reitit/issues/75
;; Parts (c) https://github.com/lambdaisland/uri/tree/master/src/lambdaisland/uri
;;
#?(:clj
@ -184,6 +184,10 @@
(defn percent-encode [^String unencoded]
(->> (.getBytes unencoded "UTF-8") (map byte->percent) (str/join))))
;;
;; encoding & decoding
;;
;; + is safe, but removed so it would work the same as with js
(defn url-encode [s]
(if s

View file

@ -65,6 +65,8 @@
;{:a (seq [1 2])} "a=1&a=2"
;{:a #{"c" "b"}} "a=b&a=c"
;; test from https://github.com/playframework/playframework -> UriEncodingSpec.scala
(deftest url-encode-test
(are [in out]
(= out (impl/url-encode in))