Finch.io 0.1.4
This release are mostly about request reader:
- There are only async readers in Finch.io (no country for
Param
, onlyRequiredParam
andOptionalParam
, only hard-core) - New request reader that reads constant value:
ConstParam()
(useful for passing URI params) - Headers may be fetched with
RequiredHeader
andOptionalHeader
readers
So, all the things are build around common interface of RequestReader
, which means everything may be composed in a single for-comprehension chain:
val magic = for {
a <- RequiredParam("a")
b <- OptionalParam("b")
c <- RequiredHeader("c")
d <- ConstParam(10)
_ <- ValidationRule("d", "should be 10") { d == 10 }
} yield Seq(a, b, c, d)
Enjoy!