Update compojure.html.markdown

I think you meant different parameters for title and author
This commit is contained in:
Matthias Nehlsen 2014-09-12 19:33:03 +02:00
parent dda23f5e80
commit d855f4a156

View File

@ -156,7 +156,7 @@ Now, your handlers may utilize query parameters:
(defroutes myapp
(GET "/posts" req
(let [title (get (:params req) "title")
author (get (:params req) "title")]
author (get (:params req) "author")]
(str "Title: " title ", Author: " author))))
```
@ -166,7 +166,7 @@ Or, for POST and PUT requests, form parameters as well
(defroutes myapp
(POST "/posts" req
(let [title (get (:params req) "title")
author (get (:params req) "title")]
author (get (:params req) "author")]
(str "Title: " title ", Author: " author))))
```