diff options
author | C. Bess <cbess@company.com> | 2015-11-09 17:55:53 -0600 |
---|---|---|
committer | C. Bess <cbess@company.com> | 2015-11-09 17:55:53 -0600 |
commit | df0992d72c2a28f140e6ff9681c505f36e19249a (patch) | |
tree | 508aa3abe4c25b957dca442560d9c95c9b1fc97a /compojure.html.markdown | |
parent | afc5ea14654e0e9cd11c7ef1b672639d12418bad (diff) | |
parent | c460e1fafa0e9b4edc6a5cb35b970bb5cc030a81 (diff) |
Merge remote-tracking branch 'adambard/master'
Conflicts:
swift.html.markdown
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)))) ``` |