com-lihaoyi / cask

Cask: a Scala HTTP micro-framework. Cask makes it easy to set up a website, backend server, or REST API using Scala
https://com-lihaoyi.github.io/cask/
Other
525 stars 55 forks source link

Documentation speaks about `cask.Subpath` #95

Closed OndrejSpanel closed 8 months ago

OndrejSpanel commented 8 months ago

Documentation in https://com-lihaoyi.github.io/cask/#variable-routes says:

you can set the flag subpath=true and ask for a : cask.Subpath

However no cask.Subpath seems to exist, even the sample in the documentation uses request: cask.Request.

lihaoyi commented 8 months ago

I think the docs are out of date, cask.Subpath was removed in https://github.com/com-lihaoyi/cask/commit/4b0cfdf0eeca46cfccbf9fe42af42f383932c427 it seems the current way is to ask for request.remainingPathSegments

lihaoyi commented 8 months ago

Updated the docs in https://github.com/com-lihaoyi/cask/commit/7bd5f2da5423ee95f7591cbfaa2d650396cddfc5