pekko/akka-docs/rst/scala/http/routing-dsl/directives/basic-directives/extractActorSystem.rst
2016-08-16 14:59:05 +02:00

26 lines
640 B
ReStructuredText

.. _-extractActorSystem-:
extractActorSystem
==================
Signature
---------
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/BasicDirectives.scala
:snippet: extractActorSystem
Description
-----------
Extracts the ``ActorSystem`` from the ``RequestContext``, which can be useful when the external API
in your route needs one.
.. warning::
This is only supported when the available Materializer is an ActorMaterializer.
Example
-------
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
:snippet: extractActorSystem-example