ContextRouter

class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[F[_], A](mappings: (String, ContextRoutes[A, F])*)(`evidence$1`: Sync[F]): ContextRoutes[A, F]

Defines an ContextRoutes based on list of mappings.

Defines an ContextRoutes based on list of mappings.

See also

define

def define[F[_], A](mappings: (String, ContextRoutes[A, F])*)(default: ContextRoutes[A, F])(`evidence$2`: Sync[F]): ContextRoutes[A, F]

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

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

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