cask_0.27

cask

License

License

MIT
GroupId

GroupId

com.lihaoyi
ArtifactId

ArtifactId

cask_0.27
Last Version

Last Version

0.7.7
Release Date

Release Date

Type

Type

jar
Description

Description

cask_0.27
cask
Project URL

Project URL

https://github.com/lihaoyi/cask
Source Code Management

Source Code Management

https://github.com/lihaoyi/cask

Download cask_0.27

How to add to project

<!-- https://jarcasting.com/artifacts/com.lihaoyi/cask_0.27/ -->
<dependency>
    <groupId>com.lihaoyi</groupId>
    <artifactId>cask_0.27</artifactId>
    <version>0.7.7</version>
</dependency>
// https://jarcasting.com/artifacts/com.lihaoyi/cask_0.27/
implementation 'com.lihaoyi:cask_0.27:0.7.7'
// https://jarcasting.com/artifacts/com.lihaoyi/cask_0.27/
implementation ("com.lihaoyi:cask_0.27:0.7.7")
'com.lihaoyi:cask_0.27:jar:0.7.7'
<dependency org="com.lihaoyi" name="cask_0.27" rev="0.7.7">
  <artifact name="cask_0.27" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.lihaoyi', module='cask_0.27', version='0.7.7')
)
libraryDependencies += "com.lihaoyi" % "cask_0.27" % "0.7.7"
[com.lihaoyi/cask_0.27 "0.7.7"]

Dependencies

compile (3)

Group / Artifact Type Version
io.undertow : undertow-core jar 2.0.13.Final
com.lihaoyi : upickle_0.27 jar 1.2.0
com.lihaoyi : cask-util_0.27 jar 0.7.7

Project Modules

There are no modules declared in this project.

Cask: a Scala HTTP micro-framework Build Status Gitter Chat Patreon

object MinimalApplication extends cask.MainRoutes{
  @cask.get("/")
  def hello() = {
    "Hello World!"
  }

  @cask.post("/do-thing")
  def doThing(request: cask.Request) = {
    request.text().reverse
  }

  initialize()
}

Cask is a simple Scala web framework inspired by Python's Flask project. It aims to bring simplicity, flexibility and ease-of-use to Scala webservers, avoiding cryptic DSLs or complicated asynchrony.

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 has the entirety of Chapter 14: Simple Web and API Servers dedicated to the library. Hands-on Scala is a great way to level up your skills in Scala in general and Cask in particular.

Cask is profiled using the JProfiler Java Profiler, courtesy of EJ Technologies

Changelog

0.7.8

  • Upgrade undertow
  • Add support for Scala 3

0.7.7

  • Fix published examples

0.7.6

  • Add support for Dotty (to be Scala 3)

0.7.4

  • Bump Mill version to 0.8.0

0.7.3

  • Make Cask actorContext explicitly passed into every Routes case class

0.6.5

  • Add support for geny.Writable#httpContentType and geny.Writable#contentLength

0.5.7

  • Add endpoints for delete and patch
  • Allow arbitrary HTTP methods

0.5.2

  • Bump uPickle, Requests versions

0.3.7

  • Add SameSite cookie attribute
  • Fix bug in default parameters of cask routes

0.3.6

0.3.3

  • Separate cask-actor into a separate artifact, documented separately as Cask Actors

0.3.2

  • Support for Scala 2.13.2

0.3.1

  • Mismatched decorator types applied to a single method is now a compile error

  • staticFiles and staticResources now allows you to specify response headers

  • Allow cask.decorators.compress to be used as a cask.Routes or cask.Main decorator without crashing on websocket responses

  • Allow decorators to be defined and used for non-cask.Response results

0.3.0

  • Fix crashes in cask.WebsocketClientImpl

0.2.9

  • Provide a simple cross-platform builtin websocket client in cask.WsClient

0.2.8

  • Make Routes#log implicit

0.2.7

  • Cross-publish cask.util for Scala.js

0.2.6

  • Embed concurrent.ExecutionContext.global in cask.Routes by default, to be overriden if necessary

0.2.5

  • Internal refactoring to clean up routing logic

0.2.4

  • Standardize on a basic cask.Logger interface
  • Create a simple actor-based API for handling websockets in cask.WsHandler and cask.WsActor

0.2.3

  • cask.Response is now covariant

0.2.2

  • Use standard ./mill bootstrap script

0.2.1

  • Support for Scala 2.13.0

Versions

Version
0.7.7
0.7.6-1-d80b69
0.7.6
0.7.5-2-e80a21
0.7.5-1-ebf160