2015-05-11 23:05:18 +02:00
|
|
|
.. _RouteDirectives:
|
|
|
|
|
|
|
|
|
|
RouteDirectives
|
|
|
|
|
===============
|
|
|
|
|
|
2015-05-21 13:14:54 +02:00
|
|
|
The ``RouteDirectives`` have a special role in akka-http's routing DSL. Contrary to all other directives (except most
|
2015-05-11 23:05:18 +02:00
|
|
|
:ref:`FileAndResourceDirectives`) they do not produce instances of type ``Directive[L <: HList]`` but rather "plain"
|
|
|
|
|
routes of type ``Route``.
|
|
|
|
|
The reason is that the ``RouteDirectives`` 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 ``RouteDirectives`` (or
|
|
|
|
|
:ref:`FileAndResourceDirectives`):
|
|
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
|
:maxdepth: 1
|
|
|
|
|
|
|
|
|
|
complete
|
|
|
|
|
failWith
|
|
|
|
|
redirect
|
|
|
|
|
reject
|