2014-12-18 09:25:33 +01:00
|
|
|
.. _-tprovide-:
|
|
|
|
|
|
|
|
|
|
tprovide
|
|
|
|
|
========
|
|
|
|
|
|
2015-05-11 23:05:18 +02:00
|
|
|
Provides a tuple of values to the inner route.
|
2014-12-18 09:25:33 +01:00
|
|
|
|
|
|
|
|
Signature
|
|
|
|
|
---------
|
|
|
|
|
|
2015-06-19 15:35:24 +02:00
|
|
|
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/BasicDirectives.scala
|
2014-12-18 09:25:33 +01:00
|
|
|
:snippet: tprovide
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
|
|
|
|
The ``tprovide`` directive is used as a building block for :ref:`Custom Directives` to provide data to the inner route.
|
|
|
|
|
To provide just one value use the :ref:`-provide-` directive. If you want to provide values calculated from the
|
|
|
|
|
``RequestContext`` use the :ref:`-textract-` directive instead.
|
|
|
|
|
|
|
|
|
|
See :ref:`ProvideDirectives` for an overview of similar directives.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2015-05-11 23:05:18 +02:00
|
|
|
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
|
2014-12-18 09:25:33 +01:00
|
|
|
:snippet: tprovide
|