This namespace defines a default set of transform functions suitable for use in presenting results to HTTP clients.
Note that ring-based middleeware 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 middleeware may take advantage of these functions either by single use or composition.
(add-header response field value)
(add-request-id response id)
(client-handler response)
(client-handler response err-handler)
(client-handler {:keys [status headers body error]} err-handler parse-fn)
(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)
(json request data)
(json request process-fn data)
(json-errors body)
(maybe-deref maybe-ref)
(not-allowed message)
(not-allowed message other-errors)
(not-found _request)
(ok _request & args)
(parse-json-body body)
(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)
(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 is a website building & hosting documentation for Clojure/Script libraries
× close