Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun of(request: ServerRequest): RouteIdentity

The route identity of request: the one its route was materialized with, else (a handler invoked outside a materialized router) one read from the path variables the request matched.

fun of(contract: HttpRouteContract, aliases: IdentityHeaderAliases = IdentityHeaderAliases.NONE): RouteIdentity
Link copied to clipboard
fun withAliases(request: ServerRequest, aliases: IdentityHeaderAliases)

Gives request a route identity with aliases when its handler was invoked outside a materialized router (a downstream module calling a command handler directly, say), so the header aliases still apply; a request routed by the router keeps the identity its route was materialized with.