(parsable-content-type? ctx)
Tells if the request has a content-type that can be parsed by the default implementation for :processable?
Tells if the request has a content-type that can be parsed by the default implementation for :processable?
(render-seq-csv data
{{:keys [language] :as representation} :representation
:keys [dictionary fields]
:or {dictionary default-dictionary fields (keys (first data))}
:as context}
sep)
(render-seq-html-table
data
{{:keys [media-type language] :as representation} :representation
:keys [dictionary fields]
:or {dictionary default-dictionary fields (keys (first data))}
:as context}
mode)
(as-response _ {representation :representation :as context})
Coerce to a standard Ring response (a map containing :status, :headers and :body). Developers can call as-response directly, usually when they need to augment the context. It does all the charset conversion and encoding and returns are Ring response map so no further post-processing of the response will be carried out.
Coerce to a standard Ring response (a map containing :status, :headers and :body). Developers can call as-response directly, usually when they need to augment the context. It does all the charset conversion and encoding and returns are Ring response map so no further post-processing of the response will be carried out.
(ring-response ring-response-map)
(ring-response value ring-response-map)
Returns the given map as a ring response. The map is not converted
with as-response
.
An optional representation value will be converted to a ring-response
using as-response
as usual and the ring-response parameter will be
merged over it.
The merge is done with liberator.core/combine
and thus merges
recursively.
Example:
A handler returns
(ring-response {:foo :bar} {:status 999 :headers {"X-Custom" "value"})
The final response will have the overriden status code 999 and a custom header set. Assuming the negotiated content type was application/json the response will be
{:headers {"Content-Type" "application/json" "X-Custom" "value"} :status 999 :body "{'foo': 'bar'}"}
Returns the given map as a ring response. The map is not converted with `as-response`. An optional representation value will be converted to a ring-response using `as-response` as usual and the ring-response parameter will be merged over it. The merge is done with `liberator.core/combine` and thus merges recursively. Example: A handler returns (ring-response {:foo :bar} {:status 999 :headers {"X-Custom" "value"}) The final response will have the overriden status code 999 and a custom header set. Assuming the negotiated content type was application/json the response will be {:headers {"Content-Type" "application/json" "X-Custom" "value"} :status 999 :body "{'foo': 'bar'}"}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close