Liking cljdoc? Tell your friends :D

clj-rest-client.core


default-val-transformclj

(default-val-transform _ v)

Default transformation that is used on params' values

Default transformation that is used on params' values
sourceraw docstring

defrestcljmacro

(defrest definition & {:keys [] :as args})

Defines multiple functions based on definition map. For map's structure see docs.

Valid definition parameters any of the following: map literal, a symbol (naming a var that resolves to a map), a string URL. URL string can use classpath: or file: protocol.

Definition can be followed by opts key-value arguments, all of them are optional.

:param-transform This option specifies function that is uset to transform query parameter names: parameter name (symbol) -> query parameter name (string). Default identity. :val-transform This option specifies a function that is applied to all arguments after argument spec and conform and before being embedded into request map. It's a function of two arguments: param name symbol and param value, returns new param value. Defaults to a function that converts keywords to a string name (no ns). :json-bodies If true then body parameters are sent as to-JSON serialized form params, otherwise body params are simply added to request as :body. Default true. :json-responses If true then all requests specify {:as :json} and all responses are expected to be json responses. Default true.

Defines multiple functions based on definition map. For map's structure see docs.

Valid definition parameters any of the following: map literal, a symbol (naming a var that resolves to a map), a string URL.
URL string can use `classpath:` or `file:` protocol.

Definition can be followed by opts key-value arguments, all of them are optional.

`:param-transform` This option specifies function that is uset to transform query parameter names: parameter name (symbol) -> query parameter name (string). Default `identity`.
`:val-transform` This option specifies a function that is applied to all arguments after argument spec and conform and before being embedded into
 request map. It's a function of two arguments: param name symbol and param value, returns new param value.
 Defaults to a function that converts keywords to a string name (no ns).
`:json-bodies` If true then body parameters are sent as to-JSON serialized form params, otherwise body params are simply added to request as `:body`. Default true.
`:json-responses` If true then all requests specify `{:as :json}` and all responses are expected to be json responses. Default true.
sourceraw docstring

defrest-mapcljmacro

(defrest-map definition
             {:keys [json-responses json-bodies param-transform val-transform]
              :or {json-responses true json-bodies true}})
source

merge-mapsclj

(merge-maps & values)
source

parse-varsclj

(parse-vars uri)

Parse URI into alternating fixed strings and vars.

Parse URI into alternating fixed strings and vars.
sourceraw docstring

prefix-middlewareclj

(prefix-middleware url-prefix)

Function for creating a clj-http middleware that prepends to url.

Function for creating a clj-http middleware that prepends to url.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close