github finagle/finch 0.1.4
Finch.io 0.1.4

latest releases: v0.34.1, v0.34.0, v0.33.0...
9 years ago

This release are mostly about request reader:

  • There are only async readers in Finch.io (no country for Param, only RequiredParam and OptionalParam, only hard-core)
  • New request reader that reads constant value: ConstParam() (useful for passing URI params)
  • Headers may be fetched with RequiredHeader and OptionalHeader 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!

Don't miss a new finch release

NewReleases is sending notifications on new releases.