mirror of
https://github.com/metosin/reitit.git
synced 2026-01-07 07:59:50 +00:00
mention sources
This commit is contained in:
parent
ebecb7ee12
commit
7389838b59
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue