summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-08-13 15:56:26 +0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-08-13 15:56:26 +0800
commit96614d998576d46202f2079db72833e7da82818d (patch)
tree388986bf327851e92cfce1b7401e84ad7f63416b /docs
parent29fadaa77a33f415ca24bd36a88be7049b58f02d (diff)
downloadcask-96614d998576d46202f2079db72833e7da82818d.tar.gz
cask-96614d998576d46202f2079db72833e7da82818d.tar.bz2
cask-96614d998576d46202f2079db72833e7da82818d.zip
tweak docs
Diffstat (limited to 'docs')
-rw-r--r--docs/pages/1 - Cask: a Scala HTTP micro-framework .md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/pages/1 - Cask: a Scala HTTP micro-framework .md b/docs/pages/1 - Cask: a Scala HTTP micro-framework .md
index bd68ce2..fff6270 100644
--- a/docs/pages/1 - Cask: a Scala HTTP micro-framework .md
+++ b/docs/pages/1 - Cask: a Scala HTTP micro-framework .md
@@ -137,6 +137,14 @@ If you need to capture the entire sub-path of the request, you can set the flag
matter). This will make the route match any sub-path of the prefix given to the
`@cask` decorator, and give you the remainder to use in your endpoint logic.
+### Multi-method Routes
+
+$$$httpMethods
+
+Sometimes, you may want to handle multiple kinds of HTTP requests in the same
+endpoint function, e.g. with code that can accept both GETs and POSTs and decide
+what to do in each case. You can use the `@cask.route` annotation to do so
+
### Receiving Form-encoded or JSON data
$$$formJsonPost