summaryrefslogtreecommitdiffhomepage
path: root/compojure.html.markdown
diff options
context:
space:
mode:
authorJonathan Scott Duff <duff@pobox.com>2015-06-25 22:58:56 -0500
committerJonathan Scott Duff <duff@pobox.com>2015-06-25 22:58:56 -0500
commit2162639cd901a81a24eb4a566ba5108da87634cf (patch)
tree3bef6c762bcc04609e0a6cb219c3c169e5aa5748 /compojure.html.markdown
parent041064416115985ef336babe6ef7dbac726327fa (diff)
parentef771384ae672e341ec309cf71cf372143607892 (diff)
Merge remote-tracking branch 'upstream/master'
Conflicts: perl6.html.markdown
Diffstat (limited to 'compojure.html.markdown')
-rw-r--r--compojure.html.markdown8
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))))
```