This namespace defines a default set of transform functions suitable for use in presenting results to HTTP clients.
Note that ring-based middleware may take advantage of these functions either by single use or composition.
This namespace defines a default set of transform functions suitable for use in presenting results to HTTP clients. Note that ring-based middleware may take advantage of these functions either by single use or composition.
(add-header response field value)(add-request-id response id)(cors request response)(error error)(error-handler status headers body)(error-handler status headers body default-msg)(errors errors)(html request data)(html request process-fn data)(initial-response-handler response)(initial-response-handler response err-handler)(initial-response-handler {:keys [status headers body error]}
err-handler
parse-fn)(json request data)(json request process-fn data)(json-errors body)(json-extract-field json-data field)(maybe-deref maybe-ref)(not-allowed message)(not-allowed message other-errors)(not-found _request)(ok _request & args)(parse-json-result result)(parse-xml-body body)(process-err-results data)(process-ok-results data)(process-results data)(process-results err-fn data)(process-results err-fn ok-fn data)(response-extract-field response field)(response-extract-field response extract-function field)(soft-reference->json! obj json-generator)Given a soft reference object and a Cheshire JSON generator, write the data stored in the soft reference to the generator as a JSON string.
Note, however, that sometimes the value is not a soft reference, but rather a raw value from the response. In that case, we need to skip the object conversion, and just do the realization.
Given a soft reference object and a Cheshire JSON generator, write the data stored in the soft reference to the generator as a JSON string. Note, however, that sometimes the value is not a soft reference, but rather a raw value from the response. In that case, we need to skip the object conversion, and just do the realization.
(stream->str body)(text request data)(text request process-fn data)(version-media-type response value)(xml-errors body)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |