Skip to content

Instantly share code, notes, and snippets.

Last active March 30, 2016 02:31
What would you like to do?
(ns …
(:require [compojure.core :refer [GET POST defroutes]]
; …
[ring.middleware.format :refer [wrap-restful-format]] ; see
(defroutes handler
(let [params (:params req)]
{:body (foo params)})) ; `(foo params)` will be Transit-encoded! But NOTE! return value must be map with :body slot!
(def app (-> #'handler
; …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment