Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork67
Cask: a Scala HTTP micro-framework. Cask makes it easy to set up a website, backend server, or REST API using Scala
License
com-lihaoyi/cask
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
objectMinimalApplicationextends cask.MainRoutes{@cask.get("/")defhello()= {"Hello World!" }@cask.post("/do-thing")defdoThing(request: cask.Request)= { request.text().reverse } initialize()}
Cask is a simple Scala web framework inspired by Python'sFlask project. It aims to bring simplicity,flexibility and ease-of-use to Scala webservers, avoiding cryptic DSLs orcomplicated asynchrony. Cask makes it easy to set up a website, backend server,or REST API using Scala
If you use Cask and like it, you will probably enjoy the following book by the Author:
Hands-on Scala has uses Requests-Scala extensively throughout the book, and hasthe entirety ofChapter 14: Simple Web and API Servers dedicated tothe library.Hands-on Scala is a great way to level up your skills in Scalain general and Cask in particular.
Cask is profiled using theJProfiler Java Profiler,courtesy of EJ Technologies
- Update examples to build with Mill 1.x
- Example zips are now hosted on Maven Central rather than Github Releases
- Add a helper method to create a dedicated virtual thread scheduler.#164
- Support for Java21/Loom Virtual Threads#161, seeRunning Cask with Virtual Threads
- Fix path traversal issue when serving static files#157
- Fix form submissions with empty file fields throwing exceptions#150
- Add CI testing for Java 17 and 21#156
- Allow overlap between static routes and wildcards#134
- Introduce
@postJsonCachedto allow reference to the original body payload in@postJson#123
Properly decode URL parameters when passed as path segments or query params#114
Preserve leading slash when resolving static paths#111
Add
cask.QueryParamstype to allow route methods to take arbitrary query parameters,addcask.RemainingPathSegmentsas replacement forsubpath = true#108#109#110
- Update
org.xerial:sqlite-jdbclibrary in examples to version3.41.2.1to
support Apple Silicon @staticResourcesand@staticFilesdecorators now automatically infercontent types based on file extension
- Update uPickle to 3.0.0
- Update Geny to 1.0.0
- Update Scala 3 to 3.2.2
- Update Scala.js to 1.13.0
- Update SourceCode to 0.3.0
- Update PPrint to 0.8.1
- Update Castor to 0.3.0
- Fix error reporting for invalid routes#70
- Bump uPickle to 1.6.0
- Publish Cask for Scala 2.12 again
- Improve handling on 404/405 responses with unsupported methods(#52)
- Fix example project zips
- Update Castor to 0.1.8
- Add
@cask.optionsdecorator
- Build for Scala 3.0.0
- Return 405 for unsupported HTTP methods
- Upgrade Scala versions to 2.13.5 and 3.0.0-RC3
- Add support for Scala 3.0.0-RC2
- Upgrade undertow
- Add support for Scala 3.0.0-M2
- Fix published examples
- Add support for Dotty (to be Scala 3)
- Bump Mill version to 0.8.0
- Make Cask
actorContextexplicitly passed into every Routes case class
- Add support for
geny.Writable#httpContentTypeandgeny.Writable#contentLength
- Add endpoints for
deleteandpatch - Allow arbitrary HTTP methods
- Bump uPickle, Requests versions
- Add
SameSitecookie attribute - Fix bug in default parameters of cask routes
- Extract
cask-actorinto its own repo and artifact,https://github.com/lihaoyi/castor
- Separate
cask-actorinto a separate artifact, documented separately asCask Actors
- Support for Scala 2.13.2
Mismatched decorator types applied to a single method is now a compile error
staticFilesandstaticResourcesnow allows you to specify response headersAllow
cask.decorators.compressto be used as acask.Routesorcask.Maindecorator without crashing on websocket responsesAllow decorators to be defined and used for non-
cask.Responseresults
- Fix crashes in
cask.WebsocketClientImpl
- Provide a simple cross-platform builtin websocket client in
cask.WsClient
- Make
Routes#logimplicit
- Cross-publish
cask.utilfor Scala.js
- Embed
concurrent.ExecutionContext.globalincask.Routesby default, to beoverriden if necessary
- Internal refactoring to clean up routing logic
- Standardize on a basic
cask.Loggerinterface - Create a simple actor-based API for handling websockets in
cask.WsHandlerandcask.WsActor
cask.Responseis now covariant
- Use standard
./millbootstrap script
- Support for Scala 2.13.0
About
Cask: a Scala HTTP micro-framework. Cask makes it easy to set up a website, backend server, or REST API using Scala
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.