cmr.opendap.http.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.

add-header

Documentation forthcoming

client-handler

(client-handler response)(client-handler response parse-fn)

Documentation forthcoming

cors

Documentation forthcoming

error

Documentation forthcoming

error-handler

(error-handler status headers body)

Documentation forthcoming

errors

Documentation forthcoming

html

(html _request data)

Documentation forthcoming

json

(json _request data)

Documentation forthcoming

json-errors

Documentation forthcoming

json-handler

Documentation forthcoming

not-allowed

Documentation forthcoming

not-found

Documentation forthcoming

ok

Documentation forthcoming

parse-json-body

Documentation forthcoming

parse-xml-body

Documentation forthcoming

process-err-results

(process-err-results data)

Documentation forthcoming

process-ok-results

(process-ok-results data)

Documentation forthcoming

process-results

(process-results data)

Documentation forthcoming

soft-reference->json!

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

text

(text _request data)

Documentation forthcoming

version-media-type

Documentation forthcoming

xml-errors

Documentation forthcoming