wrestler.util

Helper functions for this module. Consider these as private.

extract-url-params

(extract-url-params url)
Given an URL like foo/$bar/baz/$bang/boom/
get all the $variables and return a list of symbols that contains these
variables without the leading $

interpolate-url

(interpolate-url url params)
Given an URL with $variables in it, consecutively replace every occurance of
$variable with one of the params.

join-query-params

(join-query-params params)
Convert a clojure hashmap to a ?key=value&key=value string

request

(request method url)(request method url special-params)
Send a REST request to the server

rest-methods

Mapping of keywords to clj-http HTTP method identifiers

to-json

(to-json data)
Convert a clojure value to JSON. This uses the clojure.data.json library and
it doesn not escape slashes