CLJS: generate "GET" http request string

You might look into using some some closure functions. (goog.uri.utils)
See https://google.github.io/closure-library/api/goog.uri.utils.html#appendParamsFromMap

(require
 '[goog.string :as string]
 '[goog.uri.utils :as uri])

(uri/appendParamsFromMap "https://example.com"
                         #js {:a 1
                              :b (string/urlEncode "example query param")})

https://example.com?a=1&b=example%2520query%2520param

4 Likes