io.pedestal.http.response
added in 0.7.0
Utilities used to write Ring responses.
disable-response
added in 0.8.0
(disable-response context)
Updates the context to identify that no response is expected; this typically is because the request was upgraded to a WebSocket connection.
edn-response
added in 0.8.0
deprecated in 0.8.0
(edn-response obj)
Return a Ring response that will print the given obj
to the HTTP output stream in EDN format.
json-response
added in 0.8.0
(json-response obj)
Return a Ring response that will print the given obj
to the HTTP output stream in JSON format.
respond-with
added in 0.8.0
(respond-with context status)
(respond-with context status body)
(respond-with context status headers body)
Utility function to add a :response map to the interceptor context.
response-expected?
added in 0.8.0
(response-expected? context)
Returns true unless disable-response was previously invoked.
response?
added in 0.8.0
(response? resp)
A valid response is any map that includes an integer :status value.
terminate-when-response
added in 0.8.0
(terminate-when-response context)
Adds an interceptor chain terminator to terminate execution when a valid :response map is added to the context.