Routes

zio.http.endpoint.Routes
See theRoutes companion object
sealed trait Routes[-R, +E, M <: EndpointMiddleware]

Represents a collection of endpoints that all have handlers.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Routes[R, E, M]

Members list

Concise view

Value members

Concrete methods

def ++[R1 <: R, E1 >: E, AllIds2](that: Routes[R1, E1, M]): Routes[R1, E1, M]

Returns a new collection that contains all of these routes, plus the specified routes.

Returns a new collection that contains all of these routes, plus the specified routes.

Attributes

def toApp[R1 <: R](implicit ev: None <:< M, trace: Trace): App[R1]

Converts the collection of routes into a zio.http.App, which can be executed by a server. This method may be used when the routes are not using any middleware.

Converts the collection of routes into a zio.http.App, which can be executed by a server. This method may be used when the routes are not using any middleware.

Attributes

def toApp[R1 <: R, S](mh: RoutesMiddleware[R1, S, M])(implicit trace: Trace): App[R1]

Converts the collection of routes into a zio.http.App, which can be executed by a server. This method may be used when the routes are using middleware. You must provide a zio.http.endpoint.RoutesMiddleware that can properly provide the required middleware for the routes.

Converts the collection of routes into a zio.http.App, which can be executed by a server. This method may be used when the routes are using middleware. You must provide a zio.http.endpoint.RoutesMiddleware that can properly provide the required middleware for the routes.

Attributes