RouteDirectives

The RouteDirectivesRouteDirectives have a special role in akka-http’s routing DSL. Contrary to all other directives (except most FileAndResourceDirectives) they do not produce instances of type Directive[L <: HList] but rather “plain” routes of type RouteRouteRoute. The reason is that the RouteDirectivesRouteDirectives are not meant for wrapping an inner route (like most other directives, as intermediate-level elements of a route structure, do) but rather form the leaves of the actual route structure leaves.

So in most cases the inner-most element of a route structure branch is one of the RouteDirectivesRouteDirectives (or FileAndResourceDirectives):

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.