forest.middleware.edn
edn-request?
(edn-request? req)Checks if req is an EDN request by looking at its content-type header.
enable-destructuring-edn-parameters
macro
(enable-destructuring-edn-parameters)Enable destructuring EDN parameters in requests. Must be called before you can use any :edn-parameters destructuring form.
read-string-safely
(read-string-safely s)Reads a string in an EDN request’s body and tries to convert to Clojure data structure
wrap-edn
If a request is of EDN type, reads its body as Clojure data structure and populates it into request’s attribute :edn-parameters. Remember that you need to call the (enable-destructuring-edn-parameters) macro before any Compojure destructuring forms that involve that attribute.