2015-05-11 23:05:18 +02:00
|
|
|
.. _-withSettings-:
|
|
|
|
|
|
|
|
|
|
withSettings
|
|
|
|
|
============
|
|
|
|
|
|
2015-10-01 13:25:41 +02:00
|
|
|
Runs its inner route with the given alternative :class:`RoutingSettings`.
|
2015-05-11 23:05:18 +02:00
|
|
|
|
|
|
|
|
Signature
|
|
|
|
|
---------
|
|
|
|
|
|
2015-06-19 15:35:24 +02:00
|
|
|
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/BasicDirectives.scala
|
2015-05-11 23:05:18 +02:00
|
|
|
:snippet: withSettings
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
2015-10-01 13:25:41 +02:00
|
|
|
Allows running an inner route using an alternative :class:`RoutingSettings` in place of the default one.
|
|
|
|
|
|
|
|
|
|
The execution context can be extracted in an inner route using :ref:`-extractSettings-` directly,
|
|
|
|
|
or used by directives which internally extract the materializer without sufracing this fact in the API.
|
2015-05-11 23:05:18 +02:00
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2015-09-16 23:50:35 +02:00
|
|
|
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
|
2015-05-11 23:05:18 +02:00
|
|
|
:snippet: 0withSettings
|