summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-08-09 00:39:48 +0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-08-09 00:39:48 +0800
commit0c1ebbd786ff97e525025a1aaed59dd4d5b512ca (patch)
tree30331496c113f141e85779f0aad175e7446cbb97 /readme.md
parent2be53fc2b699de871e5decc9a94d975105516e79 (diff)
downloadcask-0c1ebbd786ff97e525025a1aaed59dd4d5b512ca.tar.gz
cask-0c1ebbd786ff97e525025a1aaed59dd4d5b512ca.tar.bz2
cask-0c1ebbd786ff97e525025a1aaed59dd4d5b512ca.zip
Allow for optional query params
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/readme.md b/readme.md
index 88f2523..b791c8d 100644
--- a/readme.md
+++ b/readme.md
@@ -172,9 +172,9 @@ object VariableRoutes extends cask.MainRoutes{
You can bind variables to endpoints by declaring them as parameters: these are
either taken from a path-segment matcher of the same name (e.g. `postId` above),
or from query-parameters of the same name (e.g. `param` above). You can make
-`param` take a `: String` to match `?param=hello`, an `: Int` for `?param=123`
-or a `Seq[String]` (as above) for repeated params such as
-`?param=hello&param=world`.
+`param` take a `: String` to match `?param=hello`, an `: Int` for `?param=123` a
+`Seq[T]` (as above) for repeated params such as `?param=hello&param=world`, or
+`: Option[T]` for cases where the `?param=hello` is optional.
If you need to capture the entire sub-path of the request, you can set the flag
`subpath=true` and ask for a `: cask.Subpath` (the name of the param doesn't