summaryrefslogtreecommitdiffhomepage
path: root/compojure.html.markdown
diff options
context:
space:
mode:
authorC. Bess <cbess@company.com>2015-11-09 17:55:53 -0600
committerC. Bess <cbess@company.com>2015-11-09 17:55:53 -0600
commitdf0992d72c2a28f140e6ff9681c505f36e19249a (patch)
tree508aa3abe4c25b957dca442560d9c95c9b1fc97a /compojure.html.markdown
parentafc5ea14654e0e9cd11c7ef1b672639d12418bad (diff)
parentc460e1fafa0e9b4edc6a5cb35b970bb5cc030a81 (diff)
Merge remote-tracking branch 'adambard/master'
Conflicts: swift.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))))
```