Utilities used to write Ring responses.
Utilities used to write Ring responses.
(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.
Updates the context to identify that no response is expected; this typically is because the request was upgraded to a WebSocket connection.
(edn-response obj)Return a Ring response that will print the given obj to the HTTP output stream in EDN format.
Return a Ring response that will print the given `obj` to the HTTP output stream in EDN format.
(json-response obj)Return a Ring response that will print the given obj to the HTTP output stream in JSON format.
Return a Ring response that will print the given `obj` to the HTTP output stream in JSON format.
(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.
Utility function to add a :response map to the interceptor context.
(response-expected? context)Returns true unless disable-response was previously invoked.
Returns true unless [[disable-response]] was previously invoked.
(response? resp)A valid response is any map that includes an integer :status value.
A valid response is any map that includes an integer :status value.
(terminate-when-response context)Adds an interceptor chain terminator to terminate execution when a valid :response map is added to the context.
Adds an interceptor chain terminator to terminate execution when a valid :response map is added to the context.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |