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

add-headerclj

(add-header response field value)

add-request-idclj

(add-request-id response id)

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


initial-response-handlerclj

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

jsonclj

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

json-errorsclj

(json-errors body)

json-extract-bodyclj


json-extract-fieldclj

(json-extract-field json-data field)

json-extract-headersclj


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-resultclj

(parse-json-result result)

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)

response-extract-fieldclj

(response-extract-field response field)
(response-extract-field response extract-function field)

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