Router

object Router
class Object
trait Matchable
class Any
Router.type

Type members

Classlikes

object Routable
Companion:
class
Source:
Router.scala
sealed trait Routable[F[_]]
Companion:
object
Source:
Router.scala
final case class Segment[F[_], A](run: Segment => OptionT[F, A])
Companion:
object
Source:
Router.scala
object Segment
Companion:
class
Source:
Router.scala

Value members

Concrete methods

def apply[F[_] : Monad](mappings: (String, HttpRoutes[F])*): HttpRoutes[F]

Defines an HttpRoutes based on list of mappings.

Defines an HttpRoutes based on list of mappings.

See also:

define

Source:
Router.scala
def define[F[_] : Monad](mappings: (String, HttpRoutes[F])*)(default: HttpRoutes[F]): HttpRoutes[F]

Defines an HttpRoutes based on list of mappings and a default Service to be used when none in the list match incomming requests.

Defines an HttpRoutes based on list of mappings and a default Service to be used when none in the list match incomming requests.

The mappings are processed in descending order (longest first) of prefix length.

Source:
Router.scala
def dynamic[F[_] : Monad](mappings: Routable[F]*)(default: HttpRoutes[F]): HttpRoutes[F]
def of[F[_] : Monad](mappings: Routable[F]*): HttpRoutes[F]