2015-06-23 18:28:53 +02:00
|
|
|
.. _-withMaterializer-:
|
2015-05-11 23:05:18 +02:00
|
|
|
|
2015-06-23 18:28:53 +02:00
|
|
|
withMaterializer
|
2015-07-17 16:18:18 +02:00
|
|
|
================
|
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-06-23 18:28:53 +02:00
|
|
|
:snippet: withMaterializer
|
2015-05-11 23:05:18 +02:00
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
2015-10-01 13:25:41 +02:00
|
|
|
Allows running an inner route using an alternative ``Materializer`` in place of the default one.
|
|
|
|
|
|
|
|
|
|
The materializer can be extracted in an inner route using :ref:`-extractMaterializer-` directly,
|
|
|
|
|
or used by directives which internally extract the materializer without sufracing this fact in the API
|
|
|
|
|
(e.g. responding with a Chunked entity).
|
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-10-09 15:19:36 +02:00
|
|
|
:snippet: withMaterializer-0
|