cask_2.13

cask

License

License

MIT
Categories

Categories

CRaSH General Purpose Libraries Utility
GroupId

GroupId

io.crashbox
ArtifactId

ArtifactId

cask_2.13
Last Version

Last Version

0.3.6-4-ff7687
Release Date

Release Date

Type

Type

jar
Description

Description

cask_2.13
cask
Project URL

Project URL

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

Source Code Management

https://github.com/lihaoyi/cask

Download cask_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/io.crashbox/cask_2.13/ -->
<dependency>
    <groupId>io.crashbox</groupId>
    <artifactId>cask_2.13</artifactId>
    <version>0.3.6-4-ff7687</version>
</dependency>
// https://jarcasting.com/artifacts/io.crashbox/cask_2.13/
implementation 'io.crashbox:cask_2.13:0.3.6-4-ff7687'
// https://jarcasting.com/artifacts/io.crashbox/cask_2.13/
implementation ("io.crashbox:cask_2.13:0.3.6-4-ff7687")
'io.crashbox:cask_2.13:jar:0.3.6-4-ff7687'
<dependency org="io.crashbox" name="cask_2.13" rev="0.3.6-4-ff7687">
  <artifact name="cask_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.crashbox', module='cask_2.13', version='0.3.6-4-ff7687')
)
libraryDependencies += "io.crashbox" % "cask_2.13" % "0.3.6-4-ff7687"
[io.crashbox/cask_2.13 "0.3.6-4-ff7687"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-reflect jar 2.13.1
io.undertow : undertow-core jar 2.0.13.Final
com.lihaoyi : upickle_2.13 jar 0.8.0
io.crashbox : cask-util_2.13 jar 0.3.6-4-ff7687

provided (1)

Group / Artifact Type Version
com.lihaoyi : acyclic_2.13 jar 0.2.0

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.7

  • Fix published examples

0.7.6

  • Add support for Dotty (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.3.6-4-ff7687