final case class Input(request: Request, route: Seq[String]) extends Product with Serializable
An input for Endpoint that glues two individual pieces together:
- Finagle's Request needed for evaluating (e.g., body
, param
)
- Finch's route (represented as Seq[String]
) needed for matching (e.g., path
)
- Source
- Input.scala
- Alphabetic
- By Inheritance
- Input
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Input, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def ensuring(cond: (Input) ⇒ Boolean, msg: ⇒ Any): Input
- def ensuring(cond: (Input) ⇒ Boolean): Input
- def ensuring(cond: Boolean, msg: ⇒ Any): Input
- def ensuring(cond: Boolean): Input
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val request: Request
- val route: Seq[String]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
withBody[CT <: String]: Body[CT]
Returns the new
Input
wrapping a given payload.Returns the new
Input
wrapping a given payload. This requires the content-type as a first type parameter (won't be inferred).import io.finch._, io.circe._
val text: Input = Input.post("/").withBody[Text.Plain]("Text Body") val json: Input = Input.post("/").withBody[Application.Json](Map("json" -> "object"))
-
def
withForm(params: (String, String)*): Input
Returns the new
Input
wrapping a givenapplication/x-www-form-urlencoded
payload.Returns the new
Input
wrapping a givenapplication/x-www-form-urlencoded
payload.- Note
In addition to media type, this will also set charset to UTF-8.
-
def
withHeaders(headers: (String, String)*): Input
Returns the new
Input
withheaders
amended. -
def
withRoute(route: Seq[String]): Input
Returns the new
Input
wrapping a givenroute
. - def →[B](y: B): (Input, B)
This is the API documentation for finch
Finch is a thin layer of purely functional basic blocks atop of [Finagle][finagle] for building composable HTTP APIs. Its mission is to provide the developers simple and robust HTTP primitives being as close as possible to the bare metal Finagle API.
Finch uses multi-project structure and contains of the following _modules_:
Please refer to the documentation for a more detailed introduction to the library.