A namespace to mimic Ring functionality, namely:
A namespace to mimic Ring functionality, namely: - turn Lambda HTTP events into Ring maps and back; - provide custom Ring middleware.
(->ring event)Turn Lambda event into a Ring map.
Turn Lambda event into a Ring map.
(json-request? request)Check if the Ring request was of a JSON type.
Check if the Ring request was of a JSON type.
(process-headers headers)Turn Lambda headers into a Ring headers map.
Turn Lambda headers into a Ring headers map.
(ring-> response)Turn a Ring response map into a Lambda HTTP response.
Turn a Ring response map into a Lambda HTTP response.
(wrap-json-body handler)(wrap-json-body handler opt)A middleware that, if the request was JSON, replaces the :body field with the parsed JSON data. Takes an optional map of Jsam settings.
A middleware that, if the request was JSON, replaces the :body field with the parsed JSON data. Takes an optional map of Jsam settings.
(wrap-json-params handler)(wrap-json-params handler opt)A middleware that, if the request was JSON, adds the :json-params field to the request, and also merged then with :params, if the data was a map. Takes an optional map of Jsam settings.
A middleware that, if the request was JSON, adds the :json-params field to the request, and also merged then with :params, if the data was a map. Takes an optional map of Jsam settings.
(wrap-json-response handler)(wrap-json-response handler opt)A middleware that, if the body of the response was a collection, transforms the body into a JSON string and adds a Content-Type header with JSON mime-type. Takes an optional map of Jsam settings.
A middleware that, if the body of the response was a collection, transforms the body into a JSON string and adds a Content-Type header with JSON mime-type. Takes an optional map of Jsam settings.
(wrap-ring-event handler)A ring middleware that transforms an HTTP Lambda event into a Ring request, processes it with a Ring handler, and turns the result into a Lambda HTTP response.
A ring middleware that transforms an HTTP Lambda event into a Ring request, processes it with a Ring handler, and turns the result into a Lambda HTTP response.
(wrap-ring-exception handler)A middleware what captures any Ring exceptions, logs them and returns a negative HTTP response.
A middleware what captures any Ring exceptions, logs them and returns a negative HTTP response.
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 |