diff options
author | Elena Bolshakova <lena-san@yandex-team.ru> | 2015-06-10 11:34:14 +0300 |
---|---|---|
committer | Elena Bolshakova <lena-san@yandex-team.ru> | 2015-06-10 11:34:14 +0300 |
commit | 193f66553fc114e83e7c4cfb4607e4a1b57c4f09 (patch) | |
tree | 30988e25d31ed6dff83cf409ad093c3c7ec9322c /compojure.html.markdown | |
parent | 676568cca8731d0dbb2d2bdeff08cc092d283177 (diff) | |
parent | 5086480a04d27cff2380f04609210082000538d4 (diff) |
Merge branch 'master' of https://github.com/adambard/learnxinyminutes-docs
Diffstat (limited to 'compojure.html.markdown')
-rw-r--r-- | compojure.html.markdown | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compojure.html.markdown b/compojure.html.markdown index 36a8d123..32181e26 100644 --- a/compojure.html.markdown +++ b/compojure.html.markdown @@ -155,8 +155,8 @@ Now, your handlers may utilize query parameters: ```clojure (defroutes myapp (GET "/posts" req - (let [title (get (:params req) "title") - author (get (:params req) "author")] + (let [title (get (:params req) :title) + author (get (:params req) :author)] (str "Title: " title ", Author: " author)))) ``` @@ -165,8 +165,8 @@ Or, for POST and PUT requests, form parameters as well ```clojure (defroutes myapp (POST "/posts" req - (let [title (get (:params req) "title") - author (get (:params req) "author")] + (let [title (get (:params req) :title) + author (get (:params req) :author)] (str "Title: " title ", Author: " author)))) ``` |