-
-
Save charles-dyfis-net/6e7362a50e043ae7b327 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use 'compojure.core) | |
(require '[compojure.handler :as handler]) | |
(require '[compojure.route :as route]) | |
(def my-request | |
{:request-method :post | |
:uri "/lists/5/items" | |
:headers [] | |
:body "hello world" | |
:params {:x "foo" :y "bar" :z "baz" :w "qux"}}) | |
(defroutes my-destructuring-route | |
(POST "/lists/:id/items" [id :as {body :body}] (str "body was: " body "; with id: " id))) | |
(my-destructuring-route my-request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment