class Bootstrap[ES <: HList, CTS <: HList] extends AnyRef
Bootstraps a Finagle HTTP service out of the collection of Finch endpoints.
val api: Service[Request, Response] = Bootstrap .configure(negotiateContentType = true, enableMethodNotAllowed = true) .serve[Application.Json](getUser :+: postUser) .serve[Text.Plain](healthcheck) .toService
Supported Configuration Options
- includeDateHeader
(default: true
): whether or not to include the Date header into
each response (see RFC2616, section 14.18)
- includeServerHeader
(default: true
): whether or not to include the Server header into
each response (see RFC2616, section 14.38)
- negotiateContentType
(default: false
): whether or not to enable server-driven content type
negotiation (see RFC2616, section 12.1)
- enableMethodNotAllowed
(default: false
): whether or not to enable 405 MethodNotAllowed HTTP
response (see RFC2616, section 10.4.6)
- Self Type
- Bootstrap[ES, CTS]
- Source
- Bootstrap.scala
- See also
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
https://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
- Alphabetic
- By Inheritance
- Bootstrap
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
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): (Bootstrap[ES, CTS], 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 configure(includeDateHeader: Boolean = self.includeDateHeader, includeServerHeader: Boolean = self.includeServerHeader, negotiateContentType: Boolean = self.negotiateContentType, enableMethodNotAllowed: Boolean = self.enableMethodNotAllowed): Bootstrap[ES, CTS]
- val enableMethodNotAllowed: Boolean
- val endpoints: ES
- def ensuring(cond: (Bootstrap[ES, CTS]) ⇒ Boolean, msg: ⇒ Any): Bootstrap[ES, CTS]
- def ensuring(cond: (Bootstrap[ES, CTS]) ⇒ Boolean): Bootstrap[ES, CTS]
- def ensuring(cond: Boolean, msg: ⇒ Any): Bootstrap[ES, CTS]
- def ensuring(cond: Boolean): Bootstrap[ES, CTS]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val includeDateHeader: Boolean
- val includeServerHeader: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val negotiateContentType: Boolean
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def serve[CT]: Serve[CT]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toService(implicit ts: ToService[ES, CTS]): Service[Request, Response]
-
final
def
toString(): String
- Definition Classes
- Bootstrap → AnyRef → Any
-
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 →[B](y: B): (Bootstrap[ES, CTS], 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.