(->mock-client mocks)
Creates a client that, when passed to any oth-client functions,
will cause them to return mock data as defined in mocks.
mocks
is a map of symbols to either data or functions. If a function
is passed, that function is executed with the same args as the mocked function.
If data is passed, the data is returned when the mock is called.
Note that enabling mocks disables malli validation of inputs.
Creates a client that, when passed to any oth-client functions, will cause them to return mock data as defined in mocks. `mocks` is a map of symbols to either data or functions. If a function is passed, that function is executed with the same args as the mocked function. If data is passed, the data is returned when the mock is called. Note that enabling mocks disables malli validation of inputs.
(->output success-codes input)
(->output success-codes post-processor input)
Creates a success or error map. If provided, will run the post-processor over the decoded input
Creates a success or error map. If provided, will run the post-processor over the decoded input
(decode json-string)
(encode clj-data)
(make-mockable)
Replaces any functions marked :mockable in the current namespace with an implementation that supports returning mock values.
Replaces any functions marked :mockable in the current namespace with an implementation that supports returning mock values.
(opts->request opts)
Creates a clj-http request map from the opts passed in.
Creates a clj-http request map from the opts passed in.
(opts->request-with-body opts body)
Creates a clj-http POST request map from the given opts and body
Creates a clj-http POST request map from the given opts and body
(prune-map-transformer)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close