Liking cljdoc? Tell your friends :D

lambda.ring

A namespace to mimic Ring functionality, namely:

  • turn Lambda HTTP events into Ring maps and back;
  • provide custom Ring middleware.
A namespace to mimic Ring functionality, namely:
- turn Lambda HTTP events into Ring maps and back;
- provide custom Ring middleware.
raw docstring

->ringclj

(->ring event)

Turn Lambda event into a Ring map.

Turn Lambda event into a Ring map.
sourceraw docstring

assoc-json-paramsclj

(assoc-json-params request json)
source

CONTENT-TYPE-JSONclj

source

IBodycljprotocol

->bodyclj

(->body this)
source

json-request?clj

(json-request? request)

Check if the Ring request was of a JSON type.

Check if the Ring request was of a JSON type.
sourceraw docstring

process-headersclj

(process-headers headers)

Turn Lambda headers into a Ring headers map.

Turn Lambda headers into a Ring headers map.
sourceraw docstring

response-internal-errorclj

source

response-json-malformedclj

source

ring->clj

(ring-> response)

Turn a Ring response map into a Lambda HTTP response.

Turn a Ring response map into a Lambda HTTP response.
sourceraw docstring

wrap-json-bodyclj

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

wrap-json-paramsclj

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

wrap-json-responseclj

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

wrap-ring-eventclj

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

wrap-ring-exceptionclj

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

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close