2014-12-18 09:25:33 +01:00
|
|
|
.. _-mapRouteResult-:
|
|
|
|
|
|
|
|
|
|
mapRouteResult
|
2015-05-11 23:05:18 +02:00
|
|
|
==============
|
2014-12-18 09:25:33 +01:00
|
|
|
|
|
|
|
|
Changes the message the inner route sends to the responder.
|
|
|
|
|
|
|
|
|
|
Signature
|
|
|
|
|
---------
|
|
|
|
|
|
2015-05-11 23:05:18 +02:00
|
|
|
.. includecode2:: /../../akka-http-scala/src/main/scala/akka/http/scaladsl/server/directives/BasicDirectives.scala
|
2014-12-18 09:25:33 +01:00
|
|
|
:snippet: mapRouteResult
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
2015-05-11 23:05:18 +02:00
|
|
|
The ``mapRouteResult`` directive is used as a building block for :ref:`Custom Directives` to transform the
|
|
|
|
|
:ref:`RouteResult` coming back from the inner route.
|
2014-12-18 09:25:33 +01:00
|
|
|
|
|
|
|
|
See :ref:`Result Transformation Directives` for similar directives.
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2015-05-21 17:34:46 +02:00
|
|
|
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
|
2014-12-18 09:25:33 +01:00
|
|
|
:snippet: 0mapRouteResult
|