Liking cljdoc? Tell your friends :D

cmr.http.kit.response

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.
raw docstring

add-headerclj

(add-header response field value)

add-request-idclj

(add-request-id response id)

client-handlerclj

(client-handler response)
(client-handler response err-handler)
(client-handler {:keys [status headers body error]} err-handler parse-fn)

corsclj

(cors request response)

errorclj

(error error)

error-handlerclj

(error-handler status headers body)
(error-handler status headers body default-msg)

errorsclj

(errors errors)

htmlclj

(html request data)
(html request process-fn data)

identity-handlerclj


jsonclj

(json request data)
(json request process-fn data)

json-errorsclj

(json-errors body)

json-handlerclj


maybe-derefclj

(maybe-deref maybe-ref)

not-allowedclj

(not-allowed message)
(not-allowed message other-errors)

not-foundclj

(not-found _request)

okclj

(ok _request & args)

parse-json-bodyclj

(parse-json-body body)

parse-xml-bodyclj

(parse-xml-body body)

process-err-resultsclj

(process-err-results data)

process-ok-resultsclj

(process-ok-results data)

process-resultsclj

(process-results data)
(process-results err-fn data)
(process-results err-fn ok-fn data)

soft-reference->json!clj

(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.
raw docstring

stream->strclj

(stream->str body)

textclj

(text request data)
(text request process-fn data)

version-media-typeclj

(version-media-type response value)

xml-errorsclj

(xml-errors body)

xml-handlerclj

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

× close