mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-01 12:30:48 +02:00
Merge pull request #761 from matthiasn/patch-1
Update compojure.html.markdown
This commit is contained in:
@@ -156,7 +156,7 @@ Now, your handlers may utilize query parameters:
|
|||||||
(defroutes myapp
|
(defroutes myapp
|
||||||
(GET "/posts" req
|
(GET "/posts" req
|
||||||
(let [title (get (:params req) "title")
|
(let [title (get (:params req) "title")
|
||||||
author (get (:params req) "title")]
|
author (get (:params req) "author")]
|
||||||
(str "Title: " title ", Author: " author))))
|
(str "Title: " title ", Author: " author))))
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ Or, for POST and PUT requests, form parameters as well
|
|||||||
(defroutes myapp
|
(defroutes myapp
|
||||||
(POST "/posts" req
|
(POST "/posts" req
|
||||||
(let [title (get (:params req) "title")
|
(let [title (get (:params req) "title")
|
||||||
author (get (:params req) "title")]
|
author (get (:params req) "author")]
|
||||||
(str "Title: " title ", Author: " author))))
|
(str "Title: " title ", Author: " author))))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user