28 lines
838 B
ReStructuredText
28 lines
838 B
ReStructuredText
.. _-textract-:
|
|
|
|
textract
|
|
========
|
|
|
|
Calculates a Tuple of values from the request context and provides them to the inner route.
|
|
|
|
Signature
|
|
---------
|
|
|
|
.. includecode2:: /../../akka-http/src/main/scala/akka/http/server/directives/BasicDirectives.scala
|
|
:snippet: textract
|
|
|
|
Description
|
|
-----------
|
|
|
|
The ``textract`` directive is used as a building block for :ref:`Custom Directives` to extract data from the
|
|
``RequestContext`` and provide it to the inner route. To extract just one value use the :ref:`-extract-` directive. To
|
|
provide a constant value independent of the ``RequestContext`` use the :ref:`-tprovide-` directive instead.
|
|
|
|
See :ref:`ProvideDirectives` for an overview of similar directives.
|
|
|
|
|
|
Example
|
|
-------
|
|
|
|
.. includecode2:: ../../../code/docs/http/server/directives/BasicDirectivesExamplesSpec.scala
|
|
:snippet: textract
|