diff options
Diffstat (limited to 'docs/pages')
-rw-r--r-- | docs/pages/1 - Cask: a Scala HTTP micro-framework .md | 8 |
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 |